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

Function vlazy

freebsd/kern/vfs_subr.c:3038–3060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3036}
3037
3038void
3039vlazy(struct vnode *vp)
3040{
3041 struct mount *mp;
3042
3043 VNASSERT(vp->v_holdcnt > 0, vp, ("%s: vnode not held", __func__));
3044
3045 if ((vp->v_mflag & VMP_LAZYLIST) != 0)
3046 return;
3047 /*
3048 * We may get here for inactive routines after the vnode got doomed.
3049 */
3050 if (VN_IS_DOOMED(vp))
3051 return;
3052 mp = vp->v_mount;
3053 mtx_lock(&mp->mnt_listmtx);
3054 if ((vp->v_mflag & VMP_LAZYLIST) == 0) {
3055 vp->v_mflag |= VMP_LAZYLIST;
3056 TAILQ_INSERT_TAIL(&mp->mnt_lazyvnodelist, vp, v_lazylist);
3057 mp->mnt_lazyvnodelistsize++;
3058 }
3059 mtx_unlock(&mp->mnt_listmtx);
3060}
3061
3062/*
3063 * This routine is only meant to be called from vgonel prior to dooming

Callers 2

vop_stdadd_writecountFunction · 0.85
vdefer_inactiveFunction · 0.85

Calls 2

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected