summaryrefslogtreecommitdiffstats
path: root/cddl/compat
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2011-05-26 16:27:00 +0000
committerwill <will@FreeBSD.org>2011-05-26 16:27:00 +0000
commitc8af0886c3b7ce419275e215003b0b19370f708b (patch)
tree1870e000ac77cf19dcbaa67aae74c7628be730e8 /cddl/compat
parent5b0ca88c4422cf299a819311db1824827a725b71 (diff)
downloadFreeBSD-src-c8af0886c3b7ce419275e215003b0b19370f708b.zip
FreeBSD-src-c8af0886c3b7ce419275e215003b0b19370f708b.tar.gz
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
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 e8faa92..c3247f9 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.
*/
OpenPOWER on IntegriCloud