- 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.
This commit is contained in:
Jeff Roberson 2003-10-04 13:16:54 +00:00
parent 478042909d
commit 0c31ea3b2d
2 changed files with 10 additions and 6 deletions

View File

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

View File

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