diff options
author | kib <kib@FreeBSD.org> | 2015-02-24 01:46:43 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-02-24 01:46:43 +0000 |
commit | 9534a4a47238751d26b9766b4f4121b229bb6ec1 (patch) | |
tree | 1ed3eb08b18821f6e00c682c7f1146049634b0b9 /usr.sbin/mountd | |
parent | 7b2a7d1b7b661046fd05b9271b6692a87f4ddeab (diff) | |
download | FreeBSD-src-9534a4a47238751d26b9766b4f4121b229bb6ec1.zip FreeBSD-src-9534a4a47238751d26b9766b4f4121b229bb6ec1.tar.gz |
MFC r278523:
In mountd, silence a race with the parallel unmount.
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r-- | usr.sbin/mountd/mountd.c | 6 |
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); |