path: root/contrib
diff options
authorEmmanuel Dreyfus <>2014-12-24 14:17:21 +0100
committerVijay Bellur <>2015-01-02 01:42:12 -0800
commit4c3a6bc4573013df1912996e77ded48fddc01516 (patch)
tree75cd150df775b293401e2f1398a53bc83bc90978 /contrib
parenta96375c180901756753246cb00b42f44fd8b4fd7 (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 <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'contrib')
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/fuse-lib/mount-common.c b/contrib/fuse-lib/mount-common.c
index cd226fa..c436cb1 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);
- 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 */