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

Function cache_zap_locked_bucket

freebsd/kern/vfs_cache.c:1590–1613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1588}
1589
1590static int __noinline
1591cache_zap_locked_bucket(struct namecache *ncp, struct componentname *cnp,
1592 uint32_t hash, struct mtx *blp)
1593{
1594 struct mtx *dvlp, *vlp;
1595 struct vnode *dvp;
1596
1597 cache_assert_bucket_locked(ncp);
1598
1599 dvlp = VP2VNODELOCK(ncp->nc_dvp);
1600 vlp = NULL;
1601 if (!(ncp->nc_flag & NCF_NEGATIVE))
1602 vlp = VP2VNODELOCK(ncp->nc_vp);
1603 if (cache_trylock_vnodes(dvlp, vlp) == 0) {
1604 cache_zap_locked(ncp);
1605 mtx_unlock(blp);
1606 cache_unlock_vnodes(dvlp, vlp);
1607 return (0);
1608 }
1609
1610 dvp = ncp->nc_dvp;
1611 mtx_unlock(blp);
1612 return (cache_zap_unlocked_bucket(ncp, cnp, dvp, dvlp, vlp, hash, blp));
1613}
1614
1615static __noinline int
1616cache_remove_cnp(struct vnode *dvp, struct componentname *cnp)

Callers 2

cache_remove_cnpFunction · 0.85
cache_lookup_fallbackFunction · 0.85

Calls 7

VP2VNODELOCKFunction · 0.85
cache_trylock_vnodesFunction · 0.85
cache_zap_lockedFunction · 0.85
cache_unlock_vnodesFunction · 0.85
mtx_unlockFunction · 0.70

Tested by

no test coverage detected