aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/mount_bsd.c37
1 files 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 <sys/stat.h>
#include <sys/wait.h>
-#include <sys/sysctl.h>
#include <sys/user.h>
#include <stdio.h>
#include <stdlib.h>
@@ -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) {