Move KASSERTs which checks value of v_usecount after vnode locking, so

it will not produce wrong alarms.
This commit is contained in:
bp 2000-10-02 09:57:06 +00:00
parent af5c59dc4f
commit a9effa9b45
2 changed files with 8 additions and 4 deletions

View File

@ -1479,10 +1479,11 @@ vrele(vp)
struct proc *p = curproc; /* XXX */
KASSERT(vp != NULL, ("vrele: null vp"));
KASSERT(vp->v_writecount < vp->v_usecount, ("vrele: missed vn_close"));
simple_lock(&vp->v_interlock);
KASSERT(vp->v_writecount < vp->v_usecount, ("vrele: missed vn_close"));
if (vp->v_usecount > 1) {
vp->v_usecount--;
@ -1525,10 +1526,11 @@ vput(vp)
struct proc *p = curproc; /* XXX */
KASSERT(vp != NULL, ("vput: null vp"));
KASSERT(vp->v_writecount < vp->v_usecount, ("vput: missed vn_close"));
simple_lock(&vp->v_interlock);
KASSERT(vp->v_writecount < vp->v_usecount, ("vput: missed vn_close"));
if (vp->v_usecount > 1) {
vp->v_usecount--;

View File

@ -1479,10 +1479,11 @@ vrele(vp)
struct proc *p = curproc; /* XXX */
KASSERT(vp != NULL, ("vrele: null vp"));
KASSERT(vp->v_writecount < vp->v_usecount, ("vrele: missed vn_close"));
simple_lock(&vp->v_interlock);
KASSERT(vp->v_writecount < vp->v_usecount, ("vrele: missed vn_close"));
if (vp->v_usecount > 1) {
vp->v_usecount--;
@ -1525,10 +1526,11 @@ vput(vp)
struct proc *p = curproc; /* XXX */
KASSERT(vp != NULL, ("vput: null vp"));
KASSERT(vp->v_writecount < vp->v_usecount, ("vput: missed vn_close"));
simple_lock(&vp->v_interlock);
KASSERT(vp->v_writecount < vp->v_usecount, ("vput: missed vn_close"));
if (vp->v_usecount > 1) {
vp->v_usecount--;