|
@@ -279,8 +279,10 @@ static void __cell_release(struct cell *cell, struct bio_list *inmates)
|
|
|
|
|
|
hlist_del(&cell->list);
|
|
|
|
|
|
- bio_list_add(inmates, cell->holder);
|
|
|
- bio_list_merge(inmates, &cell->bios);
|
|
|
+ if (inmates) {
|
|
|
+ bio_list_add(inmates, cell->holder);
|
|
|
+ bio_list_merge(inmates, &cell->bios);
|
|
|
+ }
|
|
|
|
|
|
mempool_free(cell, prison->cell_pool);
|
|
|
}
|
|
@@ -303,9 +305,10 @@ static void cell_release(struct cell *cell, struct bio_list *bios)
|
|
|
*/
|
|
|
static void __cell_release_singleton(struct cell *cell, struct bio *bio)
|
|
|
{
|
|
|
- hlist_del(&cell->list);
|
|
|
BUG_ON(cell->holder != bio);
|
|
|
BUG_ON(!bio_list_empty(&cell->bios));
|
|
|
+
|
|
|
+ __cell_release(cell, NULL);
|
|
|
}
|
|
|
|
|
|
static void cell_release_singleton(struct cell *cell, struct bio *bio)
|