mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Moved the #ifdef DIAGNOSTIC in vrele() so that the check for negative
v_usecount is always performed and only the call to vprint is conditional.
This commit is contained in:
parent
644104e65f
commit
864ef7d17e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13168
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
|
||||
* $Id: vfs_subr.c,v 1.48 1995/12/11 04:56:09 dyson Exp $
|
||||
* $Id: vfs_subr.c,v 1.49 1995/12/17 21:23:19 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -835,12 +835,12 @@ vrele(vp)
|
||||
vp->v_usecount--;
|
||||
if (vp->v_usecount > 0)
|
||||
return;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (vp->v_usecount < 0 /* || vp->v_writecount < 0 */ ) {
|
||||
#ifdef DIAGNOSTIC
|
||||
vprint("vrele: negative ref count", vp);
|
||||
#endif
|
||||
panic("vrele: negative reference cnt");
|
||||
}
|
||||
#endif
|
||||
if (vp->v_flag & VAGE) {
|
||||
TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
|
||||
vp->v_flag &= ~VAGE;
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
|
||||
* $Id: vfs_subr.c,v 1.48 1995/12/11 04:56:09 dyson Exp $
|
||||
* $Id: vfs_subr.c,v 1.49 1995/12/17 21:23:19 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -835,12 +835,12 @@ vrele(vp)
|
||||
vp->v_usecount--;
|
||||
if (vp->v_usecount > 0)
|
||||
return;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (vp->v_usecount < 0 /* || vp->v_writecount < 0 */ ) {
|
||||
#ifdef DIAGNOSTIC
|
||||
vprint("vrele: negative ref count", vp);
|
||||
#endif
|
||||
panic("vrele: negative reference cnt");
|
||||
}
|
||||
#endif
|
||||
if (vp->v_flag & VAGE) {
|
||||
TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
|
||||
vp->v_flag &= ~VAGE;
|
||||
|
Loading…
Reference in New Issue
Block a user