Clear the VFREE flag when the vnode is removed from the free list in

getnewvnode().  Otherwise routines called from VOP_INACTIVE() might
attempt to remove the vnode from a free list the vnode isn't on,
causing corruption.
PR:		18012
This commit is contained in:
Tor Egge 2000-11-02 21:42:54 +00:00
parent 028fe6ec24
commit a2d1480cf8
2 changed files with 2 additions and 0 deletions

View File

@ -582,6 +582,7 @@ getnewvnode(tag, mp, vops, vpp)
}
if (vp) {
vp->v_flag |= VDOOMED;
vp->v_flag &= ~VFREE;
freevnodes--;
simple_unlock(&vnode_free_list_slock);
cache_purge(vp);

View File

@ -582,6 +582,7 @@ getnewvnode(tag, mp, vops, vpp)
}
if (vp) {
vp->v_flag |= VDOOMED;
vp->v_flag &= ~VFREE;
freevnodes--;
simple_unlock(&vnode_free_list_slock);
cache_purge(vp);