From d09a16d804d6e4c7dd07098dd1febf3131d100a3 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sat, 31 Jan 1998 01:17:58 +0000 Subject: [PATCH] Update freevnodes when adding a vnode to the head of the free list. --- sys/kern/vfs_export.c | 6 ++++-- sys/kern/vfs_subr.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 8b757e5779fc..a28662eecd2a 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.125 1998/01/22 17:29:52 dyson Exp $ + * $Id: vfs_subr.c,v 1.126 1998/01/24 02:01:22 dyson Exp $ */ /* @@ -1458,7 +1458,9 @@ vgonel(vp, p) } else if (vp->v_flag & VTBFREE) { TAILQ_REMOVE(&vnode_tobefree_list, vp, v_freelist); vp->v_flag &= ~VTBFREE; - } + freevnodes++; + } else + freevnodes++; vp->v_flag |= VFREE; TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist); simple_unlock(&vnode_free_list_slock); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 8b757e5779fc..a28662eecd2a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.125 1998/01/22 17:29:52 dyson Exp $ + * $Id: vfs_subr.c,v 1.126 1998/01/24 02:01:22 dyson Exp $ */ /* @@ -1458,7 +1458,9 @@ vgonel(vp, p) } else if (vp->v_flag & VTBFREE) { TAILQ_REMOVE(&vnode_tobefree_list, vp, v_freelist); vp->v_flag &= ~VTBFREE; - } + freevnodes++; + } else + freevnodes++; vp->v_flag |= VFREE; TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist); simple_unlock(&vnode_free_list_slock);