diff options
author | mav <mav@FreeBSD.org> | 2014-06-11 12:56:49 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-06-11 12:56:49 +0000 |
commit | 60cbac59442236d3d8d9a9d3475a8b1b7421ae33 (patch) | |
tree | 1ab6069190ecbafa565d8c1a64e7a6c24ceb2c37 /sys/kern/vfs_subr.c | |
parent | e9f6263cd3d507155394d3e9101cc9cf18818aeb (diff) | |
download | FreeBSD-src-60cbac59442236d3d8d9a9d3475a8b1b7421ae33.zip FreeBSD-src-60cbac59442236d3d8d9a9d3475a8b1b7421ae33.tar.gz |
Remove unneeded mountlist_mtx acquisition from sync_fsync().
All struct mount fields accessed by sync_fsync() are protected by MNT_MTX.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 95f593b..e7aa92b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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); |