Commit 6cc37a67 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: call blk_queue_free_zone_bitmaps from disk_release

The zone bitmaps are only used for non-passthrough I/O, so free them as
soon as the disk is released.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220706070350.1703384-3-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f1a8bbd1
......@@ -776,8 +776,6 @@ static void blk_release_queue(struct kobject *kobj)
blk_free_queue_stats(q->stats);
kfree(q->poll_stat);
blk_queue_free_zone_bitmaps(q);
if (queue_is_mq(q))
blk_mq_release(q);
......
......@@ -1165,6 +1165,7 @@ static void disk_release(struct device *dev)
disk_release_events(disk);
kfree(disk->random);
blk_queue_free_zone_bitmaps(disk->queue);
xa_destroy(&disk->part_tbl);
disk->queue->disk = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment