Lines Matching full:vp

58 vfs_hash_index(struct vnode *vp)  in vfs_hash_index()  argument
61 return (vp->v_hash + vp->v_mount->mnt_hashseed); in vfs_hash_index()
75 struct vnode *vp; in vfs_hash_get() local
81 LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { in vfs_hash_get()
82 if (vp->v_hash != hash) in vfs_hash_get()
84 if (vp->v_mount != mp) in vfs_hash_get()
86 if (fn != NULL && fn(vp, arg)) in vfs_hash_get()
88 vs = vget_prep(vp); in vfs_hash_get()
90 error = vget_finish(vp, flags, vs); in vfs_hash_get()
95 if (vp->v_hash != hash || in vfs_hash_get()
96 (fn != NULL && fn(vp, arg))) { in vfs_hash_get()
97 vput(vp); in vfs_hash_get()
101 *vpp = vp; in vfs_hash_get()
104 if (vp == NULL) { in vfs_hash_get()
116 struct vnode *vp; in vfs_hash_ref() local
120 LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { in vfs_hash_ref()
121 if (vp->v_hash != hash) in vfs_hash_ref()
123 if (vp->v_mount != mp) in vfs_hash_ref()
125 if (fn != NULL && fn(vp, arg)) in vfs_hash_ref()
127 vhold(vp); in vfs_hash_ref()
129 vref(vp); in vfs_hash_ref()
130 vdrop(vp); in vfs_hash_ref()
131 *vpp = vp; in vfs_hash_ref()
134 if (vp == NULL) { in vfs_hash_ref()
143 vfs_hash_remove(struct vnode *vp) in vfs_hash_remove() argument
147 LIST_REMOVE(vp, v_hashlist); in vfs_hash_remove()
152 vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, in vfs_hash_insert() argument
163 vfs_hash_bucket(vp->v_mount, hash), v_hashlist) { in vfs_hash_insert()
166 if (vp2->v_mount != vp->v_mount) in vfs_hash_insert()
176 LIST_INSERT_HEAD(&vfs_hash_side, vp, v_hashlist); in vfs_hash_insert()
178 vgone(vp); in vfs_hash_insert()
179 vput(vp); in vfs_hash_insert()
187 vp->v_hash = hash; in vfs_hash_insert()
188 LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); in vfs_hash_insert()
194 vfs_hash_rehash(struct vnode *vp, u_int hash) in vfs_hash_rehash() argument
196 ASSERT_VOP_ELOCKED(vp, "rehash requires excl lock"); in vfs_hash_rehash()
199 LIST_REMOVE(vp, v_hashlist); in vfs_hash_rehash()
200 LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist); in vfs_hash_rehash()
201 vp->v_hash = hash; in vfs_hash_rehash()
210 struct vnode *vp; in vfs_hash_changesize() local
231 while ((vp = LIST_FIRST(&vfs_hash_oldtbl[i])) != NULL) { in vfs_hash_changesize()
232 LIST_REMOVE(vp, v_hashlist); in vfs_hash_changesize()
234 vfs_hash_bucket(vp->v_mount, vp->v_hash), in vfs_hash_changesize()
235 vp, v_hashlist); in vfs_hash_changesize()