From: Bart Van Assche Date: Thu, 25 May 2017 23:38:06 +0000 (-0700) Subject: blk-mq: Only register debugfs attributes for blk-mq queues X-Git-Tag: MMI-PSA29.97-13-9~5499^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8ecdd7117ee68fe27009acc8021423870c1dcd7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git blk-mq: Only register debugfs attributes for blk-mq queues The code in blk-mq-debugfs.c assumes that it is working on a blk-mq queue and is not intended to work on a blk-sq queue. Hence only register blk-mq debugfs attributes for blk-mq queues. Fixes: commit 9c1051aacde8 ("blk-mq: untangle debugfs and sysfs") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei Reviewed-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe --- diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 504fee940052..712b018e9f54 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -887,10 +887,10 @@ int blk_register_queue(struct gendisk *disk) goto unlock; } - if (q->mq_ops) + if (q->mq_ops) { __blk_mq_register_dev(dev, q); - - blk_mq_debugfs_register(q); + blk_mq_debugfs_register(q); + } kobject_uevent(&q->kobj, KOBJ_ADD);