MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vn_dir_dd_ino

Function vn_dir_dd_ino

freebsd/kern/vfs_cache.c:3489–3512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3487}
3488
3489struct vnode *
3490vn_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
3514int
3515vn_commname(struct vnode *vp, char *buf, u_int buflen)

Callers

nothing calls this directly

Calls 5

VP2VNODELOCKFunction · 0.85
vget_prepFunction · 0.85
vget_finishFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected