From 8e6d2fbcbd6632194a3b13da9a3450e36b23cfbb Mon Sep 17 00:00:00 2001 From: dillon Date: Fri, 14 Dec 2001 07:18:31 +0000 Subject: [PATCH] A slightly different version of the vlrureclaim fix. Reported by: peter, ps --- sys/kern/vfs_subr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 14c2bdc5b322..3b1f8543c341 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -539,8 +539,6 @@ vlrureclaim(struct mount *mp, int count) { struct vnode *vp; - if (mp == NULL) - return; mtx_lock(&mntvnode_mtx); while (count && (vp = TAILQ_FIRST(&mp->mnt_nvnodelist)) != NULL) { TAILQ_REMOVE(&mp->mnt_nvnodelist, vp, v_nmntvnodes); @@ -591,7 +589,7 @@ getnewvnode(tag, mp, vops, vpp) * algorithm to be stable we have to try to reuse at least 2. * No hysteresis should be necessary. */ - if (numvnodes - freevnodes > desiredvnodes) + if (mp && numvnodes - freevnodes > desiredvnodes) vlrureclaim(mp, 2); /*