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:
parent
f1285519e2
commit
a194c9f709
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222313
@ -223,6 +223,7 @@ fsshare_main(const char *file, const char *mountpoint, const char *shareopts,
|
|||||||
error = errno;
|
error = errno;
|
||||||
unlink(tmpfile);
|
unlink(tmpfile);
|
||||||
} else {
|
} else {
|
||||||
|
fflush(newfd);
|
||||||
/*
|
/*
|
||||||
* Send SIGHUP to mountd, but unlock exports file later.
|
* Send SIGHUP to mountd, but unlock exports file later.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user