diff options
author | dg <dg@FreeBSD.org> | 1996-01-02 18:13:20 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1996-01-02 18:13:20 +0000 |
commit | d409ba2b4f2cf7eca62854fea301c0bfbb44f3ce (patch) | |
tree | a68c1d6d6c80e5469a708fb50c070bccee0481f1 /sys | |
parent | 4bdf910d5cb02a9cd42756df3e231061c02a0ccc (diff) | |
download | FreeBSD-src-d409ba2b4f2cf7eca62854fea301c0bfbb44f3ce.zip FreeBSD-src-d409ba2b4f2cf7eca62854fea301c0bfbb44f3ce.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_export.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index ae38c24..19a7dc2 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -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; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ae38c24..19a7dc2 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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; |