summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-04 11:41:44 +0200
committerJens Axboe <axboe@kernel.dk>2021-08-09 11:50:43 -0600
commit74a2b6ec9380959546d95ecc01a8fe6c7157add9 (patch)
tree44539808876843654e9d071a8b941802a83d353f /drivers/md
parentd626338735909bc2b2e7cafc332f44ed41cfdeee (diff)
downloadlinux-74a2b6ec9380959546d95ecc01a8fe6c7157add9.tar.bz2
dm: cleanup cleanup_mapped_device
md->queue is now always set when md->disk is set, so simplify the conditionals a bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Link: https://lore.kernel.org/r/20210804094147.459763-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 2c5f9e585211..7971ec8ce677 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1694,13 +1694,9 @@ static void cleanup_mapped_device(struct mapped_device *md)
md->disk->private_data = NULL;
spin_unlock(&_minor_lock);
del_gendisk(md->disk);
- }
-
- if (md->queue)
dm_queue_destroy_keyslot_manager(md->queue);
-
- if (md->disk)
blk_cleanup_disk(md->disk);
+ }
cleanup_srcu_struct(&md->io_barrier);