cell_release_singleton() in commit
6f94a4c45a6f744383f9f695dde019998db3df55
("dm thin: fix stacked bi_next usage").
A cell's hlist_del() must be accompanied by a mempool_free().
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
*/
static void __cell_release_singleton(struct cell *cell, struct bio *bio)
{
- hlist_del(&cell->list);
+ struct bio_prison *prison = cell->prison;
+
BUG_ON(cell->holder != bio);
BUG_ON(!bio_list_empty(&cell->bios));
+
+ hlist_del(&cell->list);
+ mempool_free(cell, prison->cell_pool);
}
static void cell_release_singleton(struct cell *cell, struct bio *bio)