summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2014-04-09 10:37:23 +0200
committerLuis Claudio R. Goncalves <lgoncalv@redhat.com>2021-10-11 07:51:19 -0300
commite1dbc17f0afc51deb513c5ef059c70c9fce71b4f (patch)
treeaae33ae19491afa9ddd5992f9492c759374fbc0a
parentcb49c464526568aef4ce6c9807d1d5b3e1feb8b4 (diff)
downloadlinux-rt-e1dbc17f0afc51deb513c5ef059c70c9fce71b4f.tar.gz
block: mq: use cpu_light()
there is a might sleep splat because get_cpu() disables preemption and later we grab a lock. As a workaround for this we use get_cpu_light(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r--block/blk-mq.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index c55bcf67b956..c26a84d44cc4 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -73,12 +73,12 @@ static inline struct blk_mq_ctx *__blk_mq_get_ctx(struct request_queue *q,
*/
static inline struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q)
{
- return __blk_mq_get_ctx(q, get_cpu());
+ return __blk_mq_get_ctx(q, get_cpu_light());
}
static inline void blk_mq_put_ctx(struct blk_mq_ctx *ctx)
{
- put_cpu();
+ put_cpu_light();
}
struct blk_mq_alloc_data {