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

Function cache_purge_vgone

freebsd/kern/vfs_cache.c:2688–2709  ·  view source on GitHub ↗

* Only to be used by vgone. */

Source from the content-addressed store, hash-verified

2686 * Only to be used by vgone.
2687 */
2688void
2689cache_purge_vgone(struct vnode *vp)
2690{
2691 struct mtx *vlp;
2692
2693 VNPASS(VN_IS_DOOMED(vp), vp);
2694 if (cache_has_entries(vp)) {
2695 cache_purge_impl(vp);
2696 return;
2697 }
2698
2699 /*
2700 * Serialize against a potential thread doing cache_purge.
2701 */
2702 vlp = VP2VNODELOCK(vp);
2703 mtx_wait_unlocked(vlp);
2704 if (cache_has_entries(vp)) {
2705 cache_purge_impl(vp);
2706 return;
2707 }
2708 return;
2709}
2710
2711/*
2712 * Remove all negative entries for a particular directory vnode.

Callers 1

vgonelFunction · 0.85

Calls 4

cache_has_entriesFunction · 0.85
cache_purge_implFunction · 0.85
VP2VNODELOCKFunction · 0.85
mtx_wait_unlockedFunction · 0.85

Tested by

no test coverage detected