From: Nikolaus Rath Date: Mon, 11 Sep 2017 10:19:06 +0000 (+0100) Subject: fuse_kern_unmount(): close fd before calling umount X-Git-Tag: fuse-3.2.0~3 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a6c7eab4ccdfc0b71902ef36fd2ba7634f77a0ec;p=qemu-gpiodev%2Flibfuse.git fuse_kern_unmount(): close fd before calling umount This is what the Linux version does, and it fixes a timeout under FreeBSD when the kernel sends a FUSE_DESTROY request that is never answered. --- diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c index aafde77..94a11f7 100644 --- a/lib/mount_bsd.c +++ b/lib/mount_bsd.c @@ -126,8 +126,8 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key, void fuse_kern_unmount(const char *mountpoint, int fd) { - unmount(mountpoint, MNT_FORCE); close(fd); + unmount(mountpoint, MNT_FORCE); } /* Check if kernel is doing init in background */