svn commit: r222313 - head/cddl/compat/opensolaris/misc

Will Andrews will at FreeBSD.org
Thu May 26 16:27:01 UTC 2011


Author: will
Date: Thu May 26 16:27:00 2011
New Revision: 222313
URL: http://svn.freebsd.org/changeset/base/222313

Log:
  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

Modified:
  head/cddl/compat/opensolaris/misc/fsshare.c

Modified: head/cddl/compat/opensolaris/misc/fsshare.c
==============================================================================
--- head/cddl/compat/opensolaris/misc/fsshare.c	Thu May 26 15:55:27 2011	(r222312)
+++ head/cddl/compat/opensolaris/misc/fsshare.c	Thu May 26 16:27:00 2011	(r222313)
@@ -223,6 +223,7 @@ out:
 			error = errno;
 			unlink(tmpfile);
 		} else {
+			fflush(newfd);
 			/*
 			 * Send SIGHUP to mountd, but unlock exports file later.
 			 */


More information about the svn-src-all mailing list