diff options
author | will <will@FreeBSD.org> | 2011-05-26 16:27:00 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2011-05-26 16:27:00 +0000 |
commit | c8af0886c3b7ce419275e215003b0b19370f708b (patch) | |
tree | 1870e000ac77cf19dcbaa67aae74c7628be730e8 /cddl | |
parent | 5b0ca88c4422cf299a819311db1824827a725b71 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | cddl/compat/opensolaris/misc/fsshare.c | 1 |
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. */ |