summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2016-07-07 09:03:57 +0000
committertrasz <trasz@FreeBSD.org>2016-07-07 09:03:57 +0000
commitaea1562f16d3c164b2aa8e81aba14f422c17f30c (patch)
tree595990c3c63580feac383e70c62f36197568ff07 /usr.sbin
parent85b925bd283d447cb8bf245b2e216ee9e3e31dcf (diff)
downloadFreeBSD-src-aea1562f16d3c164b2aa8e81aba14f422c17f30c.zip
FreeBSD-src-aea1562f16d3c164b2aa8e81aba14f422c17f30c.tar.gz
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
Diffstat (limited to 'usr.sbin')
-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 02971cf..e64736b 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",
OpenPOWER on IntegriCloud