diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-05-08 22:36:35 +0200 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-05-08 22:41:47 +0200 |
commit | 028bec004ea0e19eaf09104137a8efe090ab344f (patch) | |
tree | a316edb79d3601c16085ff025c02723fb5d00078 /block | |
parent | ffbbd599bd88093833c2527d4d54db11ea165004 (diff) |
block/mq: do not invoke preempt_disable()
preempt_disable() and get_cpu() don't play well together with the sleeping
locks it tries to allocate later.
It seems to be enough to replace it with get_cpu_light() and migrate_disable().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 38bf885db523..da5fe9d8ee92 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -331,7 +331,7 @@ static void blk_mq_ipi_complete_request(struct request *rq) return; } - cpu = get_cpu(); + cpu = get_cpu_light(); if (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags)) shared = cpus_share_cache(cpu, ctx->cpu); @@ -343,7 +343,7 @@ static void blk_mq_ipi_complete_request(struct request *rq) } else { rq->q->softirq_done_fn(rq); } - put_cpu(); + put_cpu_light(); } void __blk_mq_complete_request(struct request *rq) @@ -814,9 +814,9 @@ void blk_mq_run_queues(struct request_queue *q, bool async) test_bit(BLK_MQ_S_STOPPED, &hctx->state)) continue; - preempt_disable(); + migrate_disable(); blk_mq_run_hw_queue(hctx, async); - preempt_enable(); + migrate_enable(); } } EXPORT_SYMBOL(blk_mq_run_queues); @@ -843,9 +843,9 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx) { clear_bit(BLK_MQ_S_STOPPED, &hctx->state); - preempt_disable(); + migrate_disable(); blk_mq_run_hw_queue(hctx, false); - preempt_enable(); + migrate_enable(); } EXPORT_SYMBOL(blk_mq_start_hw_queue); @@ -870,9 +870,9 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async) continue; clear_bit(BLK_MQ_S_STOPPED, &hctx->state); - preempt_disable(); + migrate_disable(); blk_mq_run_hw_queue(hctx, async); - preempt_enable(); + migrate_enable(); } } EXPORT_SYMBOL(blk_mq_start_stopped_hw_queues); |