Lines Matching +full:vref +full:- +full:source
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
8 * Jan-Simon Pendry.
10 * Redistribution and use in source and binary forms, with or without
13 * 1. Redistributions of source code must retain the above copyright
51 * entry is added the lower vnode is VREF'd. When the
89 * Return a VREF'ed alias for lower vnode if already exists, else 0.
103 * Find hash base, and then search the (two-way) linked in null_hashget_locked()
106 * reference count (but NOT the lower vnode's VREF counter). in null_hashget_locked()
110 if (a->null_lowervp == lowervp && NULLTOV(a)->v_mount == mp) { in null_hashget_locked()
118 vref(vp); in null_hashget_locked()
152 hd = NULL_NHASH(xp->null_lowervp); in null_hashins()
155 if (oxp->null_lowervp == xp->null_lowervp && in null_hashins()
156 NULLTOV(oxp)->v_mount == mp) { in null_hashins()
169 lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); in null_destroy_proto()
171 vp->v_data = NULL; in null_destroy_proto()
172 vp->v_vnlock = &vp->v_lock; in null_destroy_proto()
173 vp->v_op = &dead_vnodeops; in null_destroy_proto()
196 VNPASS(lowervp->v_usecount > 0, lowervp); in null_nodeget()
220 VNPASS(vp->v_object == NULL, vp); in null_nodeget()
224 xp->null_vnode = vp; in null_nodeget()
225 xp->null_lowervp = lowervp; in null_nodeget()
226 xp->null_flags = 0; in null_nodeget()
227 vp->v_type = lowervp->v_type; in null_nodeget()
228 vp->v_data = xp; in null_nodeget()
229 vp->v_vnlock = lowervp->v_vnlock; in null_nodeget()
244 MPASS(lowervp->v_object != NULL); in null_nodeget()
245 vp->v_object = lowervp->v_object; in null_nodeget()
248 if (lowervp == MOUNTTONULLMOUNT(mp)->nullm_lowerrootvp) in null_nodeget()
249 vp->v_vflag |= VV_ROOT; in null_nodeget()
255 vp->v_object = NULL; in null_nodeget()
292 if (vp->v_op != null_vnodeop_p) { in null_checkvp()
293 printf ("null_checkvp: on non-null-node\n"); in null_checkvp()
297 if (a->null_lowervp == NULLVP) { in null_checkvp()
301 VI_LOCK_FLAGS(a->null_lowervp, MTX_DUPOK); in null_checkvp()
302 if (a->null_lowervp->v_usecount < 1) in null_checkvp()
304 vp, a->null_lowervp); in null_checkvp()
305 VI_UNLOCK(a->null_lowervp); in null_checkvp()
307 printf("null %x/%d -> %x/%d [%s, %d]\n", in null_checkvp()
309 a->null_lowervp, vrefcnt(a->null_lowervp), in null_checkvp()
312 return (a->null_lowervp); in null_checkvp()