summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c5
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c7
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c7
3 files changed, 11 insertions, 8 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 7cc8647..1962daf 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -866,18 +866,19 @@ loop:
*/
if (vp->v_mount != mp)
goto loop;
+ nvp = LIST_NEXT(vp, v_mntvnodes);
+ mtx_unlock(&mntvnode_mtx);
mtx_lock(&vp->v_interlock);
- nvp = LIST_NEXT(vp, v_mntvnodes);
dep = VTODE(vp);
if (vp->v_type == VNON ||
((dep->de_flag &
(DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 &&
(TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) {
mtx_unlock(&vp->v_interlock);
+ mtx_lock(&mntvnode_mtx);
continue;
}
- mtx_unlock(&mntvnode_mtx);
error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p);
if (error) {
mtx_lock(&mntvnode_mtx);
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index 05bb202..9834131 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -582,8 +582,8 @@ loop:
/*
* Step 5: invalidate all cached file data.
*/
- mtx_lock(&vp->v_interlock);
mtx_unlock(&mntvnode_mtx);
+ mtx_lock(&vp->v_interlock);
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) {
goto loop;
}
@@ -933,17 +933,18 @@ loop:
*/
if (vp->v_mount != mp)
goto loop;
- mtx_lock(&vp->v_interlock);
nvp = LIST_NEXT(vp, v_mntvnodes);
+ mtx_unlock(&mntvnode_mtx);
+ mtx_lock(&vp->v_interlock);
ip = VTOI(vp);
if (vp->v_type == VNON ||
((ip->i_flag &
(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 &&
(TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) {
mtx_unlock(&vp->v_interlock);
+ mtx_lock(&mntvnode_mtx);
continue;
}
- mtx_unlock(&mntvnode_mtx);
error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p);
if (error) {
mtx_lock(&mntvnode_mtx);
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 05bb202..9834131 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -582,8 +582,8 @@ loop:
/*
* Step 5: invalidate all cached file data.
*/
- mtx_lock(&vp->v_interlock);
mtx_unlock(&mntvnode_mtx);
+ mtx_lock(&vp->v_interlock);
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) {
goto loop;
}
@@ -933,17 +933,18 @@ loop:
*/
if (vp->v_mount != mp)
goto loop;
- mtx_lock(&vp->v_interlock);
nvp = LIST_NEXT(vp, v_mntvnodes);
+ mtx_unlock(&mntvnode_mtx);
+ mtx_lock(&vp->v_interlock);
ip = VTOI(vp);
if (vp->v_type == VNON ||
((ip->i_flag &
(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 &&
(TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) {
mtx_unlock(&vp->v_interlock);
+ mtx_lock(&mntvnode_mtx);
continue;
}
- mtx_unlock(&mntvnode_mtx);
error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p);
if (error) {
mtx_lock(&mntvnode_mtx);
OpenPOWER on IntegriCloud