]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - block/blk-sysfs.c
x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompat...
[karo-tx-linux.git] / block / blk-sysfs.c
index f85723332288d497e624ab66eac9211d8147cba4..3f37813ccbafdf418f6875e69dbb8f5c4022e96e 100644 (file)
@@ -877,9 +877,6 @@ int blk_register_queue(struct gendisk *disk)
        if (ret)
                return ret;
 
-       if (q->mq_ops)
-               blk_mq_register_dev(dev, q);
-
        /* Prevent changes through sysfs until registration is completed. */
        mutex_lock(&q->sysfs_lock);
 
@@ -889,6 +886,9 @@ int blk_register_queue(struct gendisk *disk)
                goto unlock;
        }
 
+       if (q->mq_ops)
+               __blk_mq_register_dev(dev, q);
+
        kobject_uevent(&q->kobj, KOBJ_ADD);
 
        wbt_enable_default(q);