From owner-svn-src-head@FreeBSD.ORG Wed Jun 11 12:56:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07D334DF; Wed, 11 Jun 2014 12:56:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E92872435; Wed, 11 Jun 2014 12:56:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5BCunCW061073; Wed, 11 Jun 2014 12:56:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5BCunam061072; Wed, 11 Jun 2014 12:56:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406111256.s5BCunam061072@svn.freebsd.org> From: Alexander Motin Date: Wed, 11 Jun 2014 12:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267362 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 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: Wed, 11 Jun 2014 12:56:50 -0000 Author: mav Date: Wed Jun 11 12:56:49 2014 New Revision: 267362 URL: http://svnweb.freebsd.org/changeset/base/267362 Log: Remove unneeded mountlist_mtx acquisition from sync_fsync(). All struct mount fields accessed by sync_fsync() are protected by MNT_MTX. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Jun 11 11:27:44 2014 (r267361) +++ head/sys/kern/vfs_subr.c Wed Jun 11 12:56:49 2014 (r267362) @@ -3656,11 +3656,8 @@ sync_fsync(struct vop_fsync_args *ap) * Walk the list of vnodes pushing all that are dirty and * not already on the sync list. */ - mtx_lock(&mountlist_mtx); - if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK) != 0) { - mtx_unlock(&mountlist_mtx); + if (vfs_busy(mp, MBF_NOWAIT) != 0) return (0); - } if (vn_start_write(NULL, &mp, V_NOWAIT) != 0) { vfs_unbusy(mp); return (0);