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.
                         */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to