diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 335eef5c3c0559f68fd52ec07bae67e3473da15d..1cb2a84f2403ba867b22693645bb42f532937d74 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1883,6 +1883,8 @@ static struct mapped_device *alloc_dev(int minor) md->disk->private_data = md; sprintf(md->disk->disk_name, "dm-%d", minor); + add_disk_no_queue_reg(md->disk); + if (IS_ENABLED(CONFIG_DAX_DRIVER)) { md->dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops, 0); @@ -1892,7 +1894,6 @@ static struct mapped_device *alloc_dev(int minor) } } - add_disk_no_queue_reg(md->disk); format_dev_t(md->name, MKDEV(_major, minor)); md->wq = alloc_workqueue("kdmflush", WQ_MEM_RECLAIM, 0);