X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..935ed37a5c468c8a1c07408573c08b8b7ef80e8b:/bsd/vfs/kpi_vfs.c diff --git a/bsd/vfs/kpi_vfs.c b/bsd/vfs/kpi_vfs.c index a1832c532..79e526ef2 100644 --- a/bsd/vfs/kpi_vfs.c +++ b/bsd/vfs/kpi_vfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -4357,6 +4357,21 @@ VNOP_INACTIVE(struct vnode *vp, vfs_context_t ctx) if (!thread_safe) { unlock_fsnode(vp, &funnel_state); } + +#if NAMEDSTREAMS + /* For file systems that do not support namedstreams natively, mark + * the shadow stream file vnode to be recycled as soon as the last + * reference goes away. To avoid re-entering reclaim code, do not + * call recycle on terminating named stream vnodes. + */ + if (vnode_isnamedstream(vp) && + (vp->v_parent != NULLVP) && + ((vp->v_parent->v_mount->mnt_kern_flag & MNTK_NAMED_STREAMS) == 0) && + ((vp->v_lflag & VL_TERMINATE) == 0)) { + vnode_recycle(vp); + } +#endif + return (_err); }