summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-06-16 09:15:47 +0200
committerJens Axboe <axboe@kernel.dk>2021-06-16 06:53:51 -0600
commit6a03cd9843fa4dcf827dc3ad60fa9b4217f3057c (patch)
treeac4f47b663b2134ecade6e6657f7625c82691591 /drivers/block
parent07a719f8fdbe4ae0f825fa1a6d2755a63deb265e (diff)
downloadlinux-6a03cd9843fa4dcf827dc3ad60fa9b4217f3057c.tar.bz2
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>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 3f40e673a101..e90f7d349816 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2183,8 +2183,8 @@ out:
static void loop_remove(struct loop_device *lo)
{
del_gendisk(lo->lo_disk);
- blk_mq_free_tag_set(&lo->tag_set);
blk_cleanup_disk(lo->lo_disk);
+ blk_mq_free_tag_set(&lo->tag_set);
mutex_destroy(&lo->lo_mutex);
kfree(lo);
}