From 55aef2632fbee191d9f79e818e287979413ee757 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 8 Jun 2006 07:55:10 +0000 Subject: [PATCH] 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) --- sys/kern/vfs_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index da6a61b84bd7..45577abfa50f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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); }