sys/vfs/union/union_vnops.c
static int
union_inactive(struct vop_inactive_args *ap)
{
	struct vnode *vp = ap->a_vp;
	/*struct thread *td = ap->a_td;*/
	struct union_node *un = VTOUNION(vp);
	struct vnode **vpp;

	/*
	 * Do nothing (and _don't_ bypass).
	 * Wait to vrele lowervp until reclaim,
	 * so that until then our union_node is in the
	 * cache and reusable.
	 *
	 * NEEDSWORK: Someday, consider inactive'ing
	 * the lowervp and then trying to reactivate it
	 * with capabilities (v_id)
	 * like they do in the name lookup cache code.
	 * That's too much work for now.
	 */

	if (un->un_dircache != 0) {
		for (vpp = un->un_dircache; *vpp != NULLVP; vpp++)
			vrele(*vpp);
		kfree (un->un_dircache, M_TEMP);
		un->un_dircache = 0;
	}

#if 0
	if ((un->un_flags & UN_ULOCK) && un->un_uppervp) {
		un->un_flags &= ~UN_ULOCK;
		vn_unlock(un->un_uppervp);
	}
#endif

	if ((un->un_flags & UN_CACHED) == 0)
		vgone_vxlocked(vp);

	return (0);
}
/*
 *	union_inactive:
 *
 *	Called with the vnode locked.  We are expected to unlock the vnode.
 *
 * union_inactive(struct vnode *a_vp, struct thread *a_td)
 */
Called with the vnode locked.  We are expected to unlock the vnode.


Called with the vnode locked . We are expected to unlock the vnode .
static int
union_inactive(struct vop_inactive_args *ap)
{
	struct vnode *vp = ap->a_vp;
	struct union_node *un = VTOUNION(vp);
	struct vnode **vpp;
	if (un->un_dircache != 0) {
		for (vpp = un->un_dircache; *vpp != NULLVP; vpp++)
			vrele(*vpp);
		kfree (un->un_dircache, M_TEMP);
		un->un_dircache = 0;
	}
#if 0
	if ((un->un_flags & UN_ULOCK) && un->un_uppervp) {
		un->un_flags &= ~UN_ULOCK;
		vn_unlock(un->un_uppervp);
	}
#endif
	if ((un->un_flags & UN_CACHED) == 0)
		vgone_vxlocked(vp);
	return (0);
}
static int union_inactive ( struct vop_inactive_args * ap ) { struct vnode * vp = ap -> a_vp ; struct union_node * un = VTOUNION ( vp ) ; struct vnode * * vpp ; if ( un -> un_dircache != 0 ) { for ( vpp = un -> un_dircache ; * vpp != NULLVP ; vpp ++ ) vrele ( * vpp ) ; kfree ( un -> un_dircache , M_TEMP ) ; un -> un_dircache = 0 ; } #if 0 if ( ( un -> un_flags & UN_ULOCK ) && un -> un_uppervp ) { un -> un_flags &= ~ UN_ULOCK ; vn_unlock ( un -> un_uppervp ) ; } #endif if ( ( un -> un_flags & UN_CACHED ) == 0 ) vgone_vxlocked ( vp ) ; return ( 0 ) ; }
union_inactive:
      Called with the vnode locked.
union_inactive : Called with the vnode locked .
/*struct thread *td = ap->a_td;*/ /*
	 * Do nothing (and _don't_ bypass).
	 * Wait to vrele lowervp until reclaim,
	 * so that until then our union_node is in the
	 * cache and reusable.
	 *
	 * NEEDSWORK: Someday, consider inactive'ing
	 * the lowervp and then trying to reactivate it
	 * with capabilities (v_id)
	 * like they do in the name lookup cache code.
	 * That's too much work for now.
	 */