|
@@ -2045,7 +2045,6 @@ static void blk_mq_init_cpu_queues(struct request_queue *q,
|
|
|
struct blk_mq_ctx *__ctx = per_cpu_ptr(q->queue_ctx, i);
|
|
|
struct blk_mq_hw_ctx *hctx;
|
|
|
|
|
|
- memset(__ctx, 0, sizeof(*__ctx));
|
|
|
__ctx->cpu = i;
|
|
|
spin_lock_init(&__ctx->lock);
|
|
|
INIT_LIST_HEAD(&__ctx->rq_list);
|
|
@@ -2352,6 +2351,9 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
|
|
|
if (!q->queue_ctx)
|
|
|
goto err_exit;
|
|
|
|
|
|
+ /* init q->mq_kobj and sw queues' kobjects */
|
|
|
+ blk_mq_sysfs_init(q);
|
|
|
+
|
|
|
q->queue_hw_ctx = kzalloc_node(nr_cpu_ids * sizeof(*(q->queue_hw_ctx)),
|
|
|
GFP_KERNEL, set->numa_node);
|
|
|
if (!q->queue_hw_ctx)
|