aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/coda
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2003-10-04 13:16:54 +0000
committerJeff Roberson <jeff@FreeBSD.org>2003-10-04 13:16:54 +0000
commit0c31ea3b2dfad7303e1cec9f64d2612f67f0ff30 (patch)
tree66e73d1a89e9e690fafcc4a31fb9869be0f82c3a /sys/fs/coda
parent478042909dde1eba9cf0f646eeb92347732cffca (diff)
downloadsrc-0c31ea3b2dfad7303e1cec9f64d2612f67f0ff30.tar.gz
src-0c31ea3b2dfad7303e1cec9f64d2612f67f0ff30.zip
- Make proper use of the mntvnode_mtx. We do not need the loop label
because we do not drop the mntvnode_mtx. If this code had ever executed and hit the loop condition it would have spun forever.
Notes
Notes: svn path=/head/; revision=120735
Diffstat (limited to 'sys/fs/coda')
-rw-r--r--sys/fs/coda/coda_subr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c
index f9e0f5601a8e..9871bd6d6daa 100644
--- a/sys/fs/coda/coda_subr.c
+++ b/sys/fs/coda/coda_subr.c
@@ -312,11 +312,12 @@ coda_checkunmounting(mp)
register struct vnode *vp, *nvp;
struct cnode *cp;
int count = 0, bad = 0;
-loop:
+
+ mtx_lock(&mntvnode_mtx);
for (vp = TAILQ_FIRST(&mp->mnt_nvnodelist); vp; vp = nvp) {
- if (vp->v_mount != mp)
- goto loop;
nvp = TAILQ_NEXT(vp, v_nmntvnodes);
+ if (vp->v_mount != mp)
+ continue;
cp = VTOC(vp);
count++;
if (!(cp->c_flags & C_UNMOUNTING)) {
@@ -325,6 +326,7 @@ loop:
cp->c_flags |= C_UNMOUNTING;
}
}
+ mtx_unlock(&mntvnode_mtx);
}
void