loop: fix order of cleaning up the queue and freeing the tagset
authorChristoph Hellwig <hch@lst.de>
Wed, 16 Jun 2021 07:15:47 +0000 (09:15 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Jun 2021 12:53:51 +0000 (06:53 -0600)
commit6a03cd9843fa4dcf827dc3ad60fa9b4217f3057c
treeac4f47b663b2134ecade6e6657f7625c82691591
parent07a719f8fdbe4ae0f825fa1a6d2755a63deb265e
loop: fix order of cleaning up the queue and freeing the tagset

We must release the queue before freeing the tagset.

Fixes: 1c99502fae35 ("loop: use blk_mq_alloc_disk and blk_cleanup_disk")
Reported-by: Bruno Goncalves <bgoncalv@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c