/* * Remove list cache external access registration. * @plc: the list cache to unregister, must be UNLOCKED. */ void lc_unregister(struct psc_listcache *plc) { pfl_opstat_destroy(plc->plc_nseen); pfl_opstat_destroy(plc->plc_st_removes); PLL_LOCK(&psc_listcaches); LIST_CACHE_LOCK(plc); pll_remove(&psc_listcaches, plc); LIST_CACHE_ULOCK(plc); PLL_ULOCK(&psc_listcaches); }
int pll_remove_pl(PolyList * pll, const Polygon * pl) { assert(pll); uint i; for (i=0; i < pll->last; i++){ if (pll->polys[i] == pl) break; } if (i == pll->last) return 0; else pll_remove(pll, i); return 1; }
void mds_bmap_timeotbl_remove(struct bmap_mds_lease *bml) { struct bmap_mds_lease *tmp; int update = 0; spinlock(&mdsBmapTimeoTbl.btt_lock); if (pll_peekhead(&mdsBmapTimeoTbl.btt_leases) == bml) update = 1; pll_remove(&mdsBmapTimeoTbl.btt_leases, bml); if (update) { tmp = pll_peekhead(&mdsBmapTimeoTbl.btt_leases); if (tmp) mdsBmapTimeoTbl.btt_minseq = tmp->bml_seq; else mdsBmapTimeoTbl.btt_minseq = mdsBmapTimeoTbl.btt_maxseq; mds_bmap_timeotbl_journal_seqno(); } freelock(&mdsBmapTimeoTbl.btt_lock); }