Merge remote-tracking branch 'asoc/topic/max98371' into asoc-next
[linux-2.6-block.git] / block / blk-mq.c
index 050f7a13021baca7347df79d8d26dad2b89e327e..1699baf39b78a8379c3cd5559b324d71da41f100 100644 (file)
@@ -1798,11 +1798,12 @@ static void blk_mq_map_swqueue(struct request_queue *q,
        /*
         * Map software to hardware queues
         */
-       queue_for_each_ctx(q, ctx, i) {
+       for_each_possible_cpu(i) {
                /* If the cpu isn't online, the cpu is mapped to first hctx */
                if (!cpumask_test_cpu(i, online_mask))
                        continue;
 
+               ctx = per_cpu_ptr(q->queue_ctx, i);
                hctx = q->mq_ops->map_queue(q, i);
 
                cpumask_set_cpu(i, hctx->cpumask);