summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Bjørling <mb@silverwolf.dk>2012-07-13 15:50:25 -0600
committerJens Axboe <axboe@kernel.dk>2012-10-04 11:04:36 +0200
commitbb49086a2a57049df744f8bbaba00b13ba18b46d (patch)
tree93e786d578aec72fac3535fc0f4fdf13d3f62ca7
parentc13b67f65027514c313734a17dfde186f2577f4d (diff)
multiqueue: create check for hardware queues having no software queues attached.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-mq-sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index 7dbe061f830c..b52b3b713606 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -332,6 +332,9 @@ int blk_mq_register_disk(struct gendisk *disk)
if (ret)
break;
+ if (!hctx->nr_ctx)
+ continue;
+
hctx_for_each_ctx(hctx, ctx, j) {
kobject_init(&ctx->kobj, &blk_mq_ctx_ktype);
ret = kobject_add(&ctx->kobj, &hctx->kobj, "%u", j);