loop: fix order of cleaning up the queue and freeing the tagset
We must release the queue before freeing the tagset.
Fixes: 1c99502fae
("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>
This commit is contained in:
parent
07a719f8fd
commit
6a03cd9843
1 changed files with 1 additions and 1 deletions
|
@ -2183,8 +2183,8 @@ out:
|
||||||
static void loop_remove(struct loop_device *lo)
|
static void loop_remove(struct loop_device *lo)
|
||||||
{
|
{
|
||||||
del_gendisk(lo->lo_disk);
|
del_gendisk(lo->lo_disk);
|
||||||
blk_mq_free_tag_set(&lo->tag_set);
|
|
||||||
blk_cleanup_disk(lo->lo_disk);
|
blk_cleanup_disk(lo->lo_disk);
|
||||||
|
blk_mq_free_tag_set(&lo->tag_set);
|
||||||
mutex_destroy(&lo->lo_mutex);
|
mutex_destroy(&lo->lo_mutex);
|
||||||
kfree(lo);
|
kfree(lo);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue