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

Function cache_neg_remove

freebsd/kern/vfs_cache.c:1279–1297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1277}
1278
1279static void
1280cache_neg_remove(struct namecache *ncp)
1281{
1282 struct neglist *nl;
1283 struct negstate *ns;
1284
1285 cache_assert_bucket_locked(ncp);
1286 nl = NCP2NEGLIST(ncp);
1287 ns = NCP2NEGSTATE(ncp);
1288 mtx_lock(&nl->nl_lock);
1289 if ((ns->neg_flag & NEG_HOT) != 0) {
1290 TAILQ_REMOVE(&nl->nl_hotlist, ncp, nc_dst);
1291 nl->nl_hotnum--;
1292 } else {
1293 TAILQ_REMOVE(&nl->nl_list, ncp, nc_dst);
1294 }
1295 mtx_unlock(&nl->nl_lock);
1296 atomic_subtract_long(&numneg, 1);
1297}
1298
1299static struct neglist *
1300cache_neg_evict_select_list(void)

Callers 1

cache_zap_lockedFunction · 0.85

Calls 6

NCP2NEGLISTFunction · 0.85
NCP2NEGSTATEFunction · 0.85
atomic_subtract_longFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected