get rid of debugging; zero out v_mount when recycling vnodes
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 4 Feb 1992 15:38:50 +0000 (07:38 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 4 Feb 1992 15:38:50 +0000 (07:38 -0800)
SCCS-vsn: sys/kern/vfs_subr.c 7.67

usr/src/sys/kern/vfs_subr.c

index 01e7541..c52dead 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)vfs_subr.c  7.66 (Berkeley) %G%
+ *     @(#)vfs_subr.c  7.67 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -647,8 +647,6 @@ vget(vp)
        return (0);
 }
 
        return (0);
 }
 
-int bug_refs = 0;
-
 /*
  * Vnode reference, just increment the count
  */
 /*
  * Vnode reference, just increment the count
  */
@@ -657,12 +655,6 @@ void vref(vp)
 {
 
        vp->v_usecount++;
 {
 
        vp->v_usecount++;
-       if (vp->v_type!=VBLK && curproc) {   /* NEEDSWORK: debugging */
-               curproc->p_spare[2]++;
-       };
-       if (bug_refs) {
-               vprint ("vref: ");
-       };
 }
 
 /*
 }
 
 /*
@@ -689,12 +681,6 @@ void vrele(vp)
                panic("vrele: null vp");
 #endif
        vp->v_usecount--;
                panic("vrele: null vp");
 #endif
        vp->v_usecount--;
-       if (vp->v_type!=VBLK && curproc) {   /* NEEDSWORK: debugging */
-               curproc->p_spare[2]--;
-       };
-       if (bug_refs) {
-               vprint ("vref: ");
-       };
        if (vp->v_usecount > 0)
                return;
 #ifdef DIAGNOSTIC
        if (vp->v_usecount > 0)
                return;
 #ifdef DIAGNOSTIC
@@ -955,6 +941,7 @@ void vgone(vp)
                *vp->v_mountb = vq;
                vp->v_mountf = NULL;
                vp->v_mountb = NULL;
                *vp->v_mountb = vq;
                vp->v_mountf = NULL;
                vp->v_mountb = NULL;
+               vp->v_mount = NULL;
        }
        /*
         * If special device, remove it from special device alias list.
        }
        /*
         * If special device, remove it from special device alias list.