From owner-svn-src-head@FreeBSD.ORG Thu May 26 16:27:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3252F106566C; Thu, 26 May 2011 16:27:01 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 240448FC0C; Thu, 26 May 2011 16:27:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4QGR1K8071907; Thu, 26 May 2011 16:27:01 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4QGR0uF071905; Thu, 26 May 2011 16:27:01 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201105261627.p4QGR0uF071905@svn.freebsd.org> From: Will Andrews Date: Thu, 26 May 2011 16:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222313 - head/cddl/compat/opensolaris/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:27:01 -0000 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. */