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

Function cache_lock_vnodes_cel

freebsd/kern/vfs_cache.c:2048–2070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2046}
2047
2048static void
2049cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp,
2050 struct vnode *dvp)
2051{
2052 struct mtx *vlp1, *vlp2;
2053
2054 MPASS(cel->vlp[0] == NULL);
2055 MPASS(cel->vlp[1] == NULL);
2056 MPASS(cel->vlp[2] == NULL);
2057
2058 MPASS(vp != NULL || dvp != NULL);
2059
2060 vlp1 = VP2VNODELOCK(vp);
2061 vlp2 = VP2VNODELOCK(dvp);
2062 cache_sort_vnodes(&vlp1, &vlp2);
2063
2064 if (vlp1 != NULL) {
2065 mtx_lock(vlp1);
2066 cel->vlp[0] = vlp1;
2067 }
2068 mtx_lock(vlp2);
2069 cel->vlp[1] = vlp2;
2070}
2071
2072static void
2073cache_unlock_vnodes_cel(struct celockstate *cel)

Callers 2

cache_enter_lockFunction · 0.85
cache_enter_lock_ddFunction · 0.85

Calls 2

VP2VNODELOCKFunction · 0.85
mtx_lockFunction · 0.70

Tested by

no test coverage detected