summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-16 09:23:48 -0600
committerJens Axboe <axboe@fb.com>2014-04-16 14:15:24 -0600
commitfd1270d5df6a005e1248e87042159a799cc4b2c9 (patch)
tree51c0235b1b7fa1df420ac023a35ff05d51867eda /block/blk-mq.c
parent8e1a6287d950ca386a738ff2043b3e2252fc0e76 (diff)
downloadlwn-fd1270d5df6a005e1248e87042159a799cc4b2c9.tar.gz
lwn-fd1270d5df6a005e1248e87042159a799cc4b2c9.zip
blk-mq: don't use preempt_count() to check for right CPU
UP or CONFIG_PREEMPT_NONE will return 0, and what we really want to check is whether or not we are on the right CPU. So don't make PREEMPT part of this, just test the CPU in the mask directly. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9180052d42cc..1fa01ff0f9bc 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -534,7 +534,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
LIST_HEAD(rq_list);
int bit, queued;
- WARN_ON(!preempt_count());
+ WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask));
if (unlikely(test_bit(BLK_MQ_S_STOPPED, &hctx->state)))
return;