If we were called to allocate a vnode that is not associated with a

mount point, do not dereference the NULL mp argument.
This commit is contained in:
Peter Wemm 2001-12-13 23:46:01 +00:00
parent 63b42c1943
commit 9446b36bab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87823

View File

@ -539,6 +539,8 @@ 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);