summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2015-07-14 15:26:34 +0300
committerMinda Chen <minda.chen@starfivetech.com>2023-11-06 14:24:45 +0300
commit3e5ec0ec0f18a178efd530ebf7cd32bf87c793e5 (patch)
tree620902f20aa941df5da5e6394ad220694d8168b0
parent6d328be681d9c9413fe99b5e78b9b8939ee506f7 (diff)
downloadlinux-3e5ec0ec0f18a178efd530ebf7cd32bf87c793e5.tar.xz
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: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--block/blk-mq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 652a31fc3bb3..0d9144ef5e5f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1564,14 +1564,14 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
return;
if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) {
- int cpu = get_cpu();
+ int cpu = get_cpu_light();
if (cpumask_test_cpu(cpu, hctx->cpumask)) {
__blk_mq_run_hw_queue(hctx);
- put_cpu();
+ put_cpu_light();
return;
}
- put_cpu();
+ put_cpu_light();
}
kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work,