- Document broken locking.

- Use vrefcnt().
This commit is contained in:
jeff 2002-09-25 02:47:49 +00:00
parent 41b9d1ca5d
commit 90e87c8eb5

View File

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