mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
In vrele() and vput(), avoid triggering the confusing "missed vn_close"
KASSERT when vp->v_usecount is zero or negative. In this case, the "v*: negative ref cnt" panic that follows is much more appropriate. Reviewed by: mckusick
This commit is contained in:
parent
fae4825cdf
commit
1feb7a6efa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76486
@ -1508,7 +1508,9 @@ vrele(vp)
|
||||
|
||||
mtx_lock(&vp->v_interlock);
|
||||
|
||||
KASSERT(vp->v_writecount < vp->v_usecount, ("vrele: missed vn_close"));
|
||||
/* Skip this v_writecount check if we're going to panic below. */
|
||||
KASSERT(vp->v_writecount < vp->v_usecount || vp->v_usecount < 1,
|
||||
("vrele: missed vn_close"));
|
||||
|
||||
if (vp->v_usecount > 1) {
|
||||
|
||||
@ -1554,7 +1556,9 @@ vput(vp)
|
||||
|
||||
KASSERT(vp != NULL, ("vput: null vp"));
|
||||
mtx_lock(&vp->v_interlock);
|
||||
KASSERT(vp->v_writecount < vp->v_usecount, ("vput: missed vn_close"));
|
||||
/* Skip this v_writecount check if we're going to panic below. */
|
||||
KASSERT(vp->v_writecount < vp->v_usecount || vp->v_usecount < 1,
|
||||
("vput: missed vn_close"));
|
||||
|
||||
if (vp->v_usecount > 1) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user