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);
_______________________________________________
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