SCCS-vsn: sys/kern/vfs_subr.c 7.60
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)vfs_subr.c 7.59 (Berkeley) %G%
+ * @(#)vfs_subr.c 7.60 (Berkeley) %G%
{
struct proc *p = curproc; /* XXX */
{
struct proc *p = curproc; /* XXX */
if (vp == NULL)
panic("vrele: null vp");
if (vp == NULL)
panic("vrele: null vp");
- if (vp->v_usecount < 0)
- vprint("vrele: bad ref count", vp);
if (vp->v_usecount > 0)
return;
if (vp->v_usecount > 0)
return;
+#ifdef DIAGNOSTIC
+ if (vp->v_usecount != 0 || vp->v_writecount != 0) {
+ vprint("vrele: bad ref count", vp);
+ panic("vrele: ref cnt");
+ }
+#endif
if (vfreeh == NULLVP) {
/*
* insert into empty list
if (vfreeh == NULLVP) {
/*
* insert into empty list
if (label != NULL)
printf("%s: ", label);
if (label != NULL)
printf("%s: ", label);
- printf("type %s, usecount %d, refcount %d,", typename[vp->v_type],
- vp->v_usecount, vp->v_holdcnt);
+ printf("type %s, usecount %d, writecount %d, refcount %d,",
+ typename[vp->v_type], vp->v_usecount, vp->v_writecount,
+ vp->v_holdcnt);
buf[0] = '\0';
if (vp->v_flag & VROOT)
strcat(buf, "|VROOT");
buf[0] = '\0';
if (vp->v_flag & VROOT)
strcat(buf, "|VROOT");