summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-02-24 01:46:43 +0000
committerkib <kib@FreeBSD.org>2015-02-24 01:46:43 +0000
commit9534a4a47238751d26b9766b4f4121b229bb6ec1 (patch)
tree1ed3eb08b18821f6e00c682c7f1146049634b0b9 /usr.sbin
parent7b2a7d1b7b661046fd05b9271b6692a87f4ddeab (diff)
downloadFreeBSD-src-9534a4a47238751d26b9766b4f4121b229bb6ec1.zip
FreeBSD-src-9534a4a47238751d26b9766b4f4121b229bb6ec1.tar.gz
MFC r278523:
In mountd, silence a race with the parallel unmount.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mountd/mountd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 87794c3..ad1964e 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -1747,8 +1747,12 @@ get_exportlist(void)
iov[5].iov_len = strlen(fsp->f_mntfromname) + 1;
errmsg[0] = '\0';
+ /*
+ * EXDEV is returned when path exists but is not a
+ * mount point. May happens if raced with unmount.
+ */
if (nmount(iov, iovlen, fsp->f_flags) < 0 &&
- errno != ENOENT && errno != ENOTSUP) {
+ errno != ENOENT && errno != ENOTSUP && errno != EXDEV) {
syslog(LOG_ERR,
"can't delete exports for %s: %m %s",
fsp->f_mntonname, errmsg);
OpenPOWER on IntegriCloud