aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/blk-mq-sysfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index 371d8800b48a..1630a20d5dcf 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -390,16 +390,15 @@ static void blk_mq_sysfs_init(struct request_queue *q)
390{ 390{
391 struct blk_mq_hw_ctx *hctx; 391 struct blk_mq_hw_ctx *hctx;
392 struct blk_mq_ctx *ctx; 392 struct blk_mq_ctx *ctx;
393 int i, j; 393 int i;
394 394
395 kobject_init(&q->mq_kobj, &blk_mq_ktype); 395 kobject_init(&q->mq_kobj, &blk_mq_ktype);
396 396
397 queue_for_each_hw_ctx(q, hctx, i) { 397 queue_for_each_hw_ctx(q, hctx, i)
398 kobject_init(&hctx->kobj, &blk_mq_hw_ktype); 398 kobject_init(&hctx->kobj, &blk_mq_hw_ktype);
399 399
400 hctx_for_each_ctx(hctx, ctx, j) 400 queue_for_each_ctx(q, ctx, i)
401 kobject_init(&ctx->kobj, &blk_mq_ctx_ktype); 401 kobject_init(&ctx->kobj, &blk_mq_ctx_ktype);
402 }
403} 402}
404 403
405/* see blk_register_queue() */ 404/* see blk_register_queue() */