Skip to content

Commit a8ecdd7

Browse files
Bart Van Asscheaxboe
authored andcommitted
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 9c1051a ("blk-mq: untangle debugfs and sysfs") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 2232203 commit a8ecdd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

block/blk-sysfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,10 @@ int blk_register_queue(struct gendisk *disk)
887887
goto unlock;
888888
}
889889

890-
if (q->mq_ops)
890+
if (q->mq_ops) {
891891
__blk_mq_register_dev(dev, q);
892-
893-
blk_mq_debugfs_register(q);
892+
blk_mq_debugfs_register(q);
893+
}
894894

895895
kobject_uevent(&q->kobj, KOBJ_ADD);
896896

0 commit comments

Comments
 (0)