Lines Matching refs:vp
60 add_share(struct vnode *vp, struct shrlock *shr) in add_share() argument
86 mutex_enter(&vp->v_lock); in add_share()
87 for (shrl = vp->v_shrlocks; shrl != NULL; shrl = shrl->next) { in add_share()
127 mutex_exit(&vp->v_lock); in add_share()
135 if (isreadonly(vp)) in add_share()
137 mutex_exit(&vp->v_lock); in add_share()
149 mutex_exit(&vp->v_lock); in add_share()
173 mutex_exit(&vp->v_lock); in add_share()
182 isreadonly(vp)) { in add_share()
185 mutex_exit(&vp->v_lock); in add_share()
201 mutex_exit(&vp->v_lock); in add_share()
221 shrl->next = vp->v_shrlocks; in add_share()
222 vp->v_shrlocks = shrl; in add_share()
225 print_shares(vp); in add_share()
228 mutex_exit(&vp->v_lock); in add_share()
292 del_share(struct vnode *vp, struct shrlock *shr) in del_share() argument
299 mutex_enter(&vp->v_lock); in del_share()
305 shrlp = &vp->v_shrlocks; in del_share()
331 cv_broadcast(&vp->v_cv); in del_share()
333 mutex_exit(&vp->v_lock); in del_share()
342 cleanshares(struct vnode *vp, pid_t pid) in cleanshares() argument
344 do_cleanshares(vp, pid, 0); in cleanshares()
352 cleanshares_by_sysid(struct vnode *vp, int32_t sysid) in cleanshares_by_sysid() argument
357 do_cleanshares(vp, 0, sysid); in cleanshares_by_sysid()
368 do_cleanshares(struct vnode *vp, pid_t pid, int32_t sysid) in do_cleanshares() argument
372 if (vp->v_shrlocks == NULL) in do_cleanshares()
382 (void) del_share(vp, &shr); in do_cleanshares()
423 shr_has_remote_shares(vnode_t *vp, int32_t sysid) in shr_has_remote_shares() argument
428 mutex_enter(&vp->v_lock); in shr_has_remote_shares()
429 shrl = vp->v_shrlocks; in shr_has_remote_shares()
438 mutex_exit(&vp->v_lock); in shr_has_remote_shares()
443 isreadonly(struct vnode *vp) in isreadonly() argument
445 return (vp->v_type != VCHR && vp->v_type != VBLK && in isreadonly()
446 vp->v_type != VFIFO && vn_is_readonly(vp)); in isreadonly()
451 print_shares(struct vnode *vp) in print_shares() argument
455 if (vp->v_shrlocks == NULL) { in print_shares()
460 shrl = vp->v_shrlocks; in print_shares()
552 nbl_share_conflict(vnode_t *vp, nbl_op_t op, caller_context_t *ct) in nbl_share_conflict() argument
559 ASSERT(nbl_in_crit(vp)); in nbl_share_conflict()
569 mutex_enter(&vp->v_lock); in nbl_share_conflict()
570 for (shrl = vp->v_shrlocks; shrl != NULL; shrl = shrl->next) { in nbl_share_conflict()
624 mutex_exit(&vp->v_lock); in nbl_share_conflict()
634 proc_has_nbmand_share_on_vp(vnode_t *vp, pid_t pid) in proc_has_nbmand_share_on_vp() argument
641 mutex_enter(&vp->v_lock); in proc_has_nbmand_share_on_vp()
642 for (shrl = vp->v_shrlocks; shrl != NULL; shrl = shrl->next) { in proc_has_nbmand_share_on_vp()
646 mutex_exit(&vp->v_lock); in proc_has_nbmand_share_on_vp()
650 mutex_exit(&vp->v_lock); in proc_has_nbmand_share_on_vp()