diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-12-24 14:17:21 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-01-02 01:42:12 -0800 |
commit | 4c3a6bc4573013df1912996e77ded48fddc01516 (patch) | |
tree | 75cd150df775b293401e2f1398a53bc83bc90978 /contrib/fuse-lib | |
parent | a96375c180901756753246cb00b42f44fd8b4fd7 (diff) |
Do not use umount -l on non Linux systems
Lazy unmount are only supported on Linux. Force umount instead, since
this code path is used in emergency exit anyway.
On NetBSD, just have the filesystem calling exit, the kernel will unmount.
BUG: 1129939
Change-Id: If623ebf60b7a747ea7e78034b6d71ec2241dea4a
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/9334
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'contrib/fuse-lib')
-rw-r--r-- | contrib/fuse-lib/mount-common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/fuse-lib/mount-common.c b/contrib/fuse-lib/mount-common.c index cd226fa3141..c436cb16a5c 100644 --- a/contrib/fuse-lib/mount-common.c +++ b/contrib/fuse-lib/mount-common.c @@ -251,9 +251,11 @@ fuse_mnt_umount (const char *progname, const char *abs_mnt, lazy ? "-l" : NULL, NULL); GFFUSE_LOGERR ("%s: failed to execute /bin/umount: %s", progname, strerror (errno)); +#elif __NetBSD__ + /* exitting the filesystem causes the umount */ + exit (0); #else - execl ("/sbin/umount", "/sbin/umount", rel_mnt, - lazy ? "-l" : NULL, NULL); + execl ("/sbin/umount", "/sbin/umount", "-f", rel_mnt, NULL); GFFUSE_LOGERR ("%s: failed to execute /sbin/umount: %s", progname, strerror (errno)); #endif /* GF_LINUX_HOST_OS */ |