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
This commit is contained in:
Will Andrews 2011-05-26 16:27:00 +00:00
parent f1285519e2
commit a194c9f709
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222313

View File

@ -223,6 +223,7 @@ fsshare_main(const char *file, const char *mountpoint, const char *shareopts,
error = errno;
unlink(tmpfile);
} else {
fflush(newfd);
/*
* Send SIGHUP to mountd, but unlock exports file later.
*/