Lines Matching full:vp

205 null_copy_inotify(struct vnode *vp, struct vnode *lvp, short flag)  in null_copy_inotify()  argument
207 if ((vn_irflag_read(vp) & flag) != 0) { in null_copy_inotify()
209 vn_irflag_unset(vp, flag); in null_copy_inotify()
211 if (__predict_false((vn_irflag_read(vp) & flag) == 0)) in null_copy_inotify()
212 vn_irflag_set(vp, flag); in null_copy_inotify()
256 * We require at least one vp. in null_bypass()
260 panic ("null_bypass: no vp's in map"); in null_bypass()
278 * that aren't. (We must always map first vp or vclean fails.) in null_bypass()
300 * of vrele'ing their vp's. We must account for in null_bypass()
374 * XXX - even though some ops have vpp returned vp's, in null_bypass()
392 struct vnode *lvp, *vp; in null_add_writecount() local
395 vp = ap->a_vp; in null_add_writecount()
396 lvp = NULLVPTOLOWERVP(vp); in null_add_writecount()
397 VI_LOCK(vp); in null_add_writecount()
399 VNASSERT(vp->v_writecount >= 0, vp, ("wrong null writecount")); in null_add_writecount()
400 VNASSERT(vp->v_writecount + ap->a_inc >= 0, vp, in null_add_writecount()
404 vp->v_writecount += ap->a_inc; in null_add_writecount()
405 VI_UNLOCK(vp); in null_add_writecount()
420 struct vnode *vp, *ldvp, *lvp; in null_lookup() local
433 vp = lvp = NULL; in null_lookup()
504 error = null_nodeget(mp, lvp, &vp); in null_lookup()
506 *ap->a_vpp = vp; in null_lookup()
516 struct vnode *vp, *ldvp; in null_open() local
518 vp = ap->a_vp; in null_open()
519 ldvp = NULLVPTOLOWERVP(vp); in null_open()
522 vp->v_object = ldvp->v_object; in null_open()
524 MPASS(vp->v_object != NULL); in null_open()
525 if ((vn_irflag_read(vp) & VIRF_PGREAD) == 0) { in null_open()
526 vn_irflag_set_cond(vp, VIRF_PGREAD); in null_open()
539 struct vnode *vp = ap->a_vp; in null_setattr() local
545 (vp->v_mount->mnt_flag & MNT_RDONLY)) in null_setattr()
548 switch (vp->v_type) { in null_setattr()
565 if (vp->v_mount->mnt_flag & MNT_RDONLY) in null_setattr()
606 struct vnode *vp = ap->a_vp; in null_access() local
615 switch (vp->v_type) { in null_access()
619 if (vp->v_mount->mnt_flag & MNT_RDONLY) in null_access()
632 struct vnode *vp = ap->a_vp; in null_accessx() local
641 switch (vp->v_type) { in null_accessx()
645 if (vp->v_mount->mnt_flag & MNT_RDONLY) in null_accessx()
667 struct vnode *lvp, *vp; in null_remove() local
669 vp = ap->a_vp; in null_remove()
670 if (vrefcnt(vp) > 1) { in null_remove()
671 lvp = NULLVPTOLOWERVP(vp); in null_remove()
676 VTONULL(vp)->null_flags |= NULLV_DROP; in null_remove()
884 struct vnode *vp = ap->a_vp; in null_unlock() local
900 nn = VTONULL(vp); in null_unlock()
901 if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { in null_unlock()
916 null_want_recycle(struct vnode *vp) in null_want_recycle() argument
923 xp = VTONULL(vp); in null_want_recycle()
924 lvp = NULLVPTOLOWERVP(vp); in null_want_recycle()
925 mp = vp->v_mount; in null_want_recycle()
944 struct vnode *vp; in null_inactive() local
946 vp = ap->a_vp; in null_inactive()
947 if (null_want_recycle(vp)) { in null_inactive()
948 vp->v_object = NULL; in null_inactive()
949 vrecycle(vp); in null_inactive()
968 struct vnode *vp; in null_reclaim() local
972 vp = ap->a_vp; in null_reclaim()
973 xp = VTONULL(vp); in null_reclaim()
976 KASSERT(lowervp != NULL && vp->v_vnlock != &vp->v_lock, in null_reclaim()
977 ("Reclaiming incomplete null vnode %p", vp)); in null_reclaim()
984 lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); in null_reclaim()
985 VI_LOCK(vp); in null_reclaim()
986 vp->v_data = NULL; in null_reclaim()
987 vp->v_object = NULL; in null_reclaim()
988 vp->v_vnlock = &vp->v_lock; in null_reclaim()
995 if (vp->v_writecount > 0) in null_reclaim()
996 VOP_ADD_WRITECOUNT(lowervp, -vp->v_writecount); in null_reclaim()
997 else if (vp->v_writecount < 0) in null_reclaim()
998 vp->v_writecount = 0; in null_reclaim()
1000 VI_UNLOCK(vp); in null_reclaim()
1014 struct vnode *vp = ap->a_vp; in null_print() local
1016 printf("\tvp=%p, lowervp=%p\n", vp, VTONULL(vp)->null_lowervp); in null_print()
1026 struct vnode *vp; in null_getwritemount() local
1028 vp = ap->a_vp; in null_getwritemount()
1029 VI_LOCK(vp); in null_getwritemount()
1030 xp = VTONULL(vp); in null_getwritemount()
1033 VI_UNLOCK(vp); in null_getwritemount()
1037 VI_UNLOCK(vp); in null_getwritemount()
1055 struct vnode *vp = ap->a_vp; in null_vptocnp() local
1061 locked = VOP_ISLOCKED(vp); in null_vptocnp()
1062 lvp = NULLVPTOLOWERVP(vp); in null_vptocnp()
1063 mp = vp->v_mount; in null_vptocnp()
1068 VOP_UNLOCK(vp); /* vp is held by vn_vptocnp_locked that called us */ in null_vptocnp()
1074 vn_lock(vp, locked | LK_RETRY); in null_vptocnp()
1082 vn_lock(vp, locked | LK_RETRY); in null_vptocnp()
1093 vn_lock(vp, locked | LK_RETRY); in null_vptocnp()
1101 struct vnode *lvp, *vp; in null_read_pgcache() local
1105 vp = ap->a_vp; in null_read_pgcache()
1106 VI_LOCK(vp); in null_read_pgcache()
1107 xp = VTONULL(vp); in null_read_pgcache()
1109 VI_UNLOCK(vp); in null_read_pgcache()
1114 VI_UNLOCK(vp); in null_read_pgcache()
1123 struct vnode *lvp, *vp; in null_advlock() local
1127 vp = ap->a_vp; in null_advlock()
1128 VI_LOCK(vp); in null_advlock()
1129 xp = VTONULL(vp); in null_advlock()
1131 VI_UNLOCK(vp); in null_advlock()
1136 VI_UNLOCK(vp); in null_advlock()
1143 * Avoid standard bypass, since lower dvp and vp could be no longer
1150 struct vnode *dvp, *ldvp, *lvp, *vp, *vp1, **vpp; in null_vput_pair() local
1158 vp = NULL; in null_vput_pair()
1162 vp = *vpp; in null_vput_pair()
1163 if (vp != NULL) { in null_vput_pair()
1164 lvp = NULLVPTOLOWERVP(vp); in null_vput_pair()
1167 vhold(vp); in null_vput_pair()
1169 mp = vp->v_mount; in null_vput_pair()
1175 if (vp != NULL && ap->a_unlock_vp) in null_vput_pair()
1176 vrele(vp); in null_vput_pair()
1179 if (vp == NULL || ap->a_unlock_vp) in null_vput_pair()
1182 /* lvp has been unlocked and vp might be reclaimed */ in null_vput_pair()
1183 VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY); in null_vput_pair()
1184 if (vp->v_data == NULL && vfs_busy(mp, MBF_NOWAIT) == 0) { in null_vput_pair()
1185 vput(vp); in null_vput_pair()
1189 vget(vp, LK_EXCLUSIVE | LK_RETRY); in null_vput_pair()
1195 vget(vp, LK_EXCLUSIVE | LK_RETRY); in null_vput_pair()
1201 vdrop(vp); in null_vput_pair()
1210 struct vnode *vp, *vpl; in null_getlowvnode() local
1212 vp = ap->a_vp; in null_getlowvnode()
1213 if (vn_lock(vp, LK_SHARED) != 0) in null_getlowvnode()
1216 vpl = NULLVPTOLOWERVP(vp); in null_getlowvnode()
1218 VOP_UNLOCK(vp); in null_getlowvnode()