Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2011 16:27:00 +0000 (UTC)
From:      Will Andrews <will@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222313 - head/cddl/compat/opensolaris/misc
Message-ID:  <201105261627.p4QGR0uF071905@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
 			 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105261627.p4QGR0uF071905>