| 3487 | } |
| 3488 | |
| 3489 | struct vnode * |
| 3490 | vn_dir_dd_ino(struct vnode *vp) |
| 3491 | { |
| 3492 | struct namecache *ncp; |
| 3493 | struct vnode *ddvp; |
| 3494 | struct mtx *vlp; |
| 3495 | enum vgetstate vs; |
| 3496 | |
| 3497 | ASSERT_VOP_LOCKED(vp, "vn_dir_dd_ino"); |
| 3498 | vlp = VP2VNODELOCK(vp); |
| 3499 | mtx_lock(vlp); |
| 3500 | TAILQ_FOREACH(ncp, &(vp->v_cache_dst), nc_dst) { |
| 3501 | if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) |
| 3502 | continue; |
| 3503 | ddvp = ncp->nc_dvp; |
| 3504 | vs = vget_prep(ddvp); |
| 3505 | mtx_unlock(vlp); |
| 3506 | if (vget_finish(ddvp, LK_SHARED | LK_NOWAIT, vs)) |
| 3507 | return (NULL); |
| 3508 | return (ddvp); |
| 3509 | } |
| 3510 | mtx_unlock(vlp); |
| 3511 | return (NULL); |
| 3512 | } |
| 3513 | |
| 3514 | int |
| 3515 | vn_commname(struct vnode *vp, char *buf, u_int buflen) |
nothing calls this directly
no test coverage detected