- Check XLOCK prior to accessing v_data.
This commit is contained in:
parent
6acdfd69be
commit
055cfed702
@ -318,6 +318,11 @@ coda_checkunmounting(mp)
|
|||||||
nvp = TAILQ_NEXT(vp, v_nmntvnodes);
|
nvp = TAILQ_NEXT(vp, v_nmntvnodes);
|
||||||
if (vp->v_mount != mp)
|
if (vp->v_mount != mp)
|
||||||
continue;
|
continue;
|
||||||
|
VI_LOCK(vp);
|
||||||
|
if (vp->v_iflag & VI_XLOCK) {
|
||||||
|
VI_UNLOCK(vp);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
cp = VTOC(vp);
|
cp = VTOC(vp);
|
||||||
count++;
|
count++;
|
||||||
if (!(cp->c_flags & C_UNMOUNTING)) {
|
if (!(cp->c_flags & C_UNMOUNTING)) {
|
||||||
@ -325,6 +330,7 @@ coda_checkunmounting(mp)
|
|||||||
printf("vp %p, cp %p missed\n", vp, cp);
|
printf("vp %p, cp %p missed\n", vp, cp);
|
||||||
cp->c_flags |= C_UNMOUNTING;
|
cp->c_flags |= C_UNMOUNTING;
|
||||||
}
|
}
|
||||||
|
VI_UNLOCK(vp);
|
||||||
}
|
}
|
||||||
mtx_unlock(&mntvnode_mtx);
|
mtx_unlock(&mntvnode_mtx);
|
||||||
}
|
}
|
||||||
|
@ -318,6 +318,11 @@ coda_checkunmounting(mp)
|
|||||||
nvp = TAILQ_NEXT(vp, v_nmntvnodes);
|
nvp = TAILQ_NEXT(vp, v_nmntvnodes);
|
||||||
if (vp->v_mount != mp)
|
if (vp->v_mount != mp)
|
||||||
continue;
|
continue;
|
||||||
|
VI_LOCK(vp);
|
||||||
|
if (vp->v_iflag & VI_XLOCK) {
|
||||||
|
VI_UNLOCK(vp);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
cp = VTOC(vp);
|
cp = VTOC(vp);
|
||||||
count++;
|
count++;
|
||||||
if (!(cp->c_flags & C_UNMOUNTING)) {
|
if (!(cp->c_flags & C_UNMOUNTING)) {
|
||||||
@ -325,6 +330,7 @@ coda_checkunmounting(mp)
|
|||||||
printf("vp %p, cp %p missed\n", vp, cp);
|
printf("vp %p, cp %p missed\n", vp, cp);
|
||||||
cp->c_flags |= C_UNMOUNTING;
|
cp->c_flags |= C_UNMOUNTING;
|
||||||
}
|
}
|
||||||
|
VI_UNLOCK(vp);
|
||||||
}
|
}
|
||||||
mtx_unlock(&mntvnode_mtx);
|
mtx_unlock(&mntvnode_mtx);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user