A slightly different version of the vlrureclaim fix.

Reported by: peter, ps
This commit is contained in:
dillon 2001-12-14 07:18:31 +00:00
parent bf2556cfad
commit 8e6d2fbcbd

View File

@ -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);
/*