Skip to content

Commit 16ad3db

Browse files
Wang Qingaxboe
authored andcommitted
nbd: fix order of cleaning up the queue and freeing the tagset
We must release the queue before freeing the tagset. Fixes: 4af5f2e ("nbd: use blk_mq_alloc_disk and blk_cleanup_disk") Reported-and-tested-by: [email protected] Signed-off-by: Wang Qing <[email protected]> Signed-off-by: Guoqing Jiang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 58b63e0 commit 16ad3db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/nbd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ static void nbd_dev_remove(struct nbd_device *nbd)
239239

240240
if (disk) {
241241
del_gendisk(disk);
242-
blk_mq_free_tag_set(&nbd->tag_set);
243242
blk_cleanup_disk(disk);
243+
blk_mq_free_tag_set(&nbd->tag_set);
244244
}
245245

246246
/*

0 commit comments

Comments
 (0)