X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..bca245acd4c03fd752d1a45f011ad495e60fe53d:/security/mac_vfs_subr.c diff --git a/security/mac_vfs_subr.c b/security/mac_vfs_subr.c index 6f4c096c7..3fb5132d5 100644 --- a/security/mac_vfs_subr.c +++ b/security/mac_vfs_subr.c @@ -46,12 +46,17 @@ vnode_label(struct mount *mp, struct vnode *dvp, struct vnode *vp, struct componentname *cnp, int flags, vfs_context_t ctx) { int error = 0; - + bool exit_fast; /* fast path checks... */ /* are we labeling vnodes? If not still notify of create */ - if (mac_label_vnodes == 0) { +#if CONFIG_MACF_LAZY_VNODE_LABELS + exit_fast = true; +#else + exit_fast = (mac_label_vnodes == 0); +#endif + if (exit_fast) { if (flags & VNODE_LABEL_CREATE) { error = mac_vnode_notify_create(ctx, mp, dvp, vp, cnp);