aboutsummaryrefslogtreecommitdiff
path: root/cddl/compat
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2011-05-26 16:27:00 +0000
committerWill Andrews <will@FreeBSD.org>2011-05-26 16:27:00 +0000
commita194c9f7090b59b6fd137d25fe5d6a5bf3461042 (patch)
tree1870e000ac77cf19dcbaa67aae74c7628be730e8 /cddl/compat
parentf1285519e2ce6d66efc93317afe922e81fa9d5c2 (diff)
downloadsrc-a194c9f7090b59b6fd137d25fe5d6a5bf3461042.tar.gz
src-a194c9f7090b59b6fd137d25fe5d6a5bf3461042.zip
Close a race between libzfs and mountd when updating NFS exports.
- Flush the file descriptor for the new ZFS exports file before sending a SIGHUP to mountd. Reviewed by: pjd Approved by: ken MFC after: 3 days
Notes
Notes: svn path=/head/; revision=222313
Diffstat (limited to 'cddl/compat')
-rw-r--r--cddl/compat/opensolaris/misc/fsshare.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cddl/compat/opensolaris/misc/fsshare.c b/cddl/compat/opensolaris/misc/fsshare.c
index e8faa928d6fb..c3247f91fec4 100644
--- a/cddl/compat/opensolaris/misc/fsshare.c
+++ b/cddl/compat/opensolaris/misc/fsshare.c
@@ -223,6 +223,7 @@ out:
error = errno;
unlink(tmpfile);
} else {
+ fflush(newfd);
/*
* Send SIGHUP to mountd, but unlock exports file later.
*/