Fix the LOR that occurs when the MAC compiled into the kernel

and vnode is destroyed.

Reviewed by:	rwatson
LOR:		189
MFC after:	2 weeks
Approved by:	kan (mentor)
This commit is contained in:
Konstantin Belousov 2006-06-08 07:55:10 +00:00
parent ce916253e4
commit 55aef2632f

View File

@ -785,9 +785,6 @@ vdestroy(struct vnode *vp)
VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst"));
VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src"));
VI_UNLOCK(vp);
#ifdef MAC
mac_destroy_vnode(vp);
#endif
if (vp->v_pollinfo != NULL) {
knlist_destroy(&vp->v_pollinfo->vpi_selinfo.si_note);
mtx_destroy(&vp->v_pollinfo->vpi_lock);
@ -799,6 +796,9 @@ vdestroy(struct vnode *vp)
#endif
lockdestroy(vp->v_vnlock);
mtx_destroy(&vp->v_interlock);
#ifdef MAC
mac_destroy_vnode(vp);
#endif
uma_zfree(vnode_zone, vp);
}