aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs/autounmountd.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-07-07 09:03:57 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-07-07 09:03:57 +0000
commitdebc480e037b7337cc27dd1200d64ac55eea0644 (patch)
tree595990c3c63580feac383e70c62f36197568ff07 /usr.sbin/autofs/autounmountd.c
parentaf625dc998ce3224c05ce266562da7a33904ac2e (diff)
downloadsrc-debc480e037b7337cc27dd1200d64ac55eea0644.tar.gz
src-debc480e037b7337cc27dd1200d64ac55eea0644.zip
Add new unmount(2) flag, MNT_NONBUSY, to check whether there are
any open vnodes before proceeding. Make autounmound(8) use this flag. Without it, even an unsuccessfull unmount causes filesystem flush, which interferes with normal operation. Reviewed by: kib@ Approved by: re (gjb@) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7047
Notes
Notes: svn path=/head/; revision=302388
Diffstat (limited to 'usr.sbin/autofs/autounmountd.c')
-rw-r--r--usr.sbin/autofs/autounmountd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c
index 02971cf72418..e64736b1884b 100644
--- a/usr.sbin/autofs/autounmountd.c
+++ b/usr.sbin/autofs/autounmountd.c
@@ -161,7 +161,7 @@ unmount_by_fsid(const fsid_t fsid, const char *mountpoint)
if (ret < 0)
log_err(1, "asprintf");
- error = unmount(fsid_str, MNT_BYFSID);
+ error = unmount(fsid_str, MNT_NONBUSY | MNT_BYFSID);
if (error != 0) {
if (errno == EBUSY) {
log_debugx("cannot unmount %s (%s): %s",