From 981c97aed4813fd3ed0f0ceb7241c1f26e32b1b6 Mon Sep 17 00:00:00 2001 From: Vassili Tchersky Date: Mon, 17 Feb 2025 08:53:03 +0100 Subject: [PATCH] FreeBSD: Remove useless options These options never had any effect. See https://svnweb.freebsd.org/base?view=revision&revision=347544 Signed-off-by: Vassili Tchersky --- lib/mount_bsd.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c index 85332d3..789f61b 100644 --- a/lib/mount_bsd.c +++ b/lib/mount_bsd.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -86,7 +85,6 @@ static const struct fuse_opt fuse_mount_opts[] = { FUSE_DUAL_OPT_KEY("private", KEY_KERN), FUSE_DUAL_OPT_KEY("neglect_shares", KEY_KERN), FUSE_DUAL_OPT_KEY("push_symlinks_in", KEY_KERN), - FUSE_OPT_KEY("nosync_unmount", KEY_KERN), #if __FreeBSD_version >= 1200519 FUSE_DUAL_OPT_KEY("intr", KEY_KERN), #endif @@ -134,21 +132,6 @@ void fuse_kern_unmount(const char *mountpoint, int fd) unmount(mountpoint, MNT_FORCE); } -/* Check if kernel is doing init in background */ -static int init_backgrounded(void) -{ - unsigned ibg; - size_t len; - - len = sizeof(ibg); - - if (sysctlbyname("vfs.fuse.init_backgrounded", &ibg, &len, NULL, 0)) - return 0; - - return ibg; -} - - static int fuse_mount_core(const char *mountpoint, const char *opts) { const char *mountprog = FUSERMOUNT_PROG; @@ -194,20 +177,12 @@ mount: } if (pid == 0) { - if (! init_backgrounded()) { - /* - * If init is not backgrounded, we have to - * call the mount util backgrounded, to avoid - * deadlock. - */ - - pid = fork(); - - if (pid == -1) { - perror("fuse: fork() failed"); - close(fd); - exit(1); - } + pid = fork(); + + if (pid == -1) { + perror("fuse: fork() failed"); + close(fd); + _exit(EXIT_FAILURE); } if (pid == 0) { -- 2.30.2