Move KASSERTs which checks value of v_usecount after vnode locking, so
it will not produce wrong alarms.
This commit is contained in:
parent
e306f644ab
commit
cad56aab99
@ -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--;
|
||||
|
@ -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--;
|
||||
|
Loading…
Reference in New Issue
Block a user