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 2011-05-26 16:27:00 +00:00
parent 5b0ca88c44
commit c8af0886c3

View File

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