summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ad13d2aa948b..2213117bb1b5 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2223,9 +2223,6 @@ select_cpu:
static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
unsigned long msecs)
{
- if (unlikely(blk_mq_hctx_stopped(hctx)))
- return;
-
if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) {
if (cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask)) {
__blk_mq_run_hw_queue(hctx);
@@ -2233,6 +2230,8 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
}
}
+ if (unlikely(blk_mq_hctx_stopped(hctx)))
+ return;
kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work,
msecs_to_jiffies(msecs));
}