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

Function swapgeom_release

freebsd/vm/swap_pager.c:2775–2785  ·  view source on GitHub ↗

* Remove a reference from the g_consumer. Post a close event if all * references go away, since the function might be called from the * biodone context. */

Source from the content-addressed store, hash-verified

2773 * biodone context.
2774 */
2775static void
2776swapgeom_release(struct g_consumer *cp, struct swdevt *sp)
2777{
2778
2779 mtx_assert(&sw_dev_mtx, MA_OWNED);
2780 cp->index--;
2781 if (cp->index == 0) {
2782 if (g_post_event(swapgeom_close_ev, cp, M_NOWAIT, NULL) == 0)
2783 sp->sw_id = NULL;
2784 }
2785}
2786
2787static void
2788swapgeom_done(struct bio *bp2)

Callers 2

swapgeom_doneFunction · 0.85
swapgeom_strategyFunction · 0.85

Calls 1

mtx_assertFunction · 0.85

Tested by

no test coverage detected