Remove unneeded mountlist_mtx acquisition from sync_fsync().

All struct mount fields accessed by sync_fsync() are protected by MNT_MTX.
This commit is contained in:
Alexander Motin 2014-06-11 12:56:49 +00:00
parent 402000ffa3
commit 4f655310bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267362

View File

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