mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue
The fact that blk_mq_destroy_queue also drops a queue reference leads to various places having to grab an extra reference. Move the call to blk_put_queue into the callers to allow removing the extra references. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20221018135720.670094-2-hch@lst.de [axboe: fix fabrics_q vs admin_q conflict in nvme core.c] Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
8ed40ee35d
commit
2b3f056f72
@@ -325,6 +325,7 @@ void bsg_remove_queue(struct request_queue *q)
|
||||
|
||||
bsg_unregister_queue(bset->bd);
|
||||
blk_mq_destroy_queue(q);
|
||||
blk_put_queue(q);
|
||||
blk_mq_free_tag_set(&bset->tag_set);
|
||||
kfree(bset);
|
||||
}
|
||||
@@ -400,6 +401,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
|
||||
return q;
|
||||
out_cleanup_queue:
|
||||
blk_mq_destroy_queue(q);
|
||||
blk_put_queue(q);
|
||||
out_queue:
|
||||
blk_mq_free_tag_set(set);
|
||||
out_tag_set:
|
||||
|
||||
Reference in New Issue
Block a user