diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 376f1ab48a245fcdce521bd55a7ceb109f7f8c9e..c5f9918dab24f5151458033a4c786d18b31d0c56 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1822,6 +1822,7 @@ static struct mapped_device *alloc_dev(int minor) bad_bdev: destroy_workqueue(md->wq); bad_thread: + del_gendisk(md->disk); put_disk(md->disk); bad_disk: blk_cleanup_queue(md->queue);