- Document broken locking.
- Use vrefcnt().
This commit is contained in:
parent
41b9d1ca5d
commit
90e87c8eb5
@ -397,11 +397,10 @@ ffs_snapshot(mp, snapfile)
|
||||
goto loop;
|
||||
nvp = TAILQ_NEXT(xvp, v_nmntvnodes);
|
||||
mtx_unlock(&mntvnode_mtx);
|
||||
mtx_lock(&xvp->v_interlock);
|
||||
if (xvp->v_usecount == 0 || xvp->v_type == VNON ||
|
||||
mp_fixme("Unlocked GETATTR.");
|
||||
if (vrefcnt(xvp) == 0 || xvp->v_type == VNON ||
|
||||
(VOP_GETATTR(xvp, &vat, td->td_proc->p_ucred, td) == 0 &&
|
||||
vat.va_nlink > 0)) {
|
||||
mtx_unlock(&xvp->v_interlock);
|
||||
mtx_lock(&mntvnode_mtx);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user