Date: Wed, 11 Oct 2006 17:26:31 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 107691 for review Message-ID: <200610111726.k9BHQViQ090663@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107691 Change 107691 by millert@millert_macbook on 2006/10/11 17:26:17 Move block of code so that labeling is only performed in the non error code path and while the vnode is protected by an IO reference (v_iocount). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#6 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#6 (text+ko) ==== @@ -3400,19 +3400,6 @@ vnode_unlock(vp); return(ENOENT); } -#ifdef MAC - if (vnode_mount(vp) != NULL && - vfs_flags(vnode_mount(vp)) & MNT_MULTILABEL) { - int error; - - error = vnode_label1(vp); - if (error) { - if (!locked) - vnode_unlock(vp); - return (error); - } - } -#endif /* * will return VL_DEAD ones */ @@ -3452,6 +3439,20 @@ vnode_list_remove(vp); } vp->v_iocount++; +#ifdef MAC + if (vnode_mount(vp) != NULL && + vfs_flags(vnode_mount(vp)) & MNT_MULTILABEL) { + int error; + + error = vnode_label1(vp); + if (error) { + vp->v_iocount--; + if (!locked) + vnode_unlock(vp); + return (error); + } + } +#endif #ifdef JOE_DEBUG record_vp(vp, 1); #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610111726.k9BHQViQ090663>