]> git.itanic.dy.fi Git - linux-stable/commit
blk-mq: fix error handling in __blk_mq_alloc_disk
authorChristoph Hellwig <hch@lst.de>
Wed, 20 Jul 2022 13:05:40 +0000 (15:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:32:23 +0000 (11:32 +0200)
commit47f57236ba4027840eb146117b5080fece4ec358
treed38604f46912c022cebee97382519837e0597e03
parent0d0f5ca7f241edf07f90599e4e7fadf1ddce97db
blk-mq: fix error handling in __blk_mq_alloc_disk

commit 0a3e5cc7bbfcd571a2e53779ef7d7aa3c57d5432 upstream.

To fully clean up the queue if the disk allocation fails we need to
call blk_mq_destroy_queue and not just blk_put_queue.

Fixes: 6f8191fdf41d ("block: simplify disk shutdown")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220720130541.1323531-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-mq.c