summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-11 11:28:12 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-06-18 12:43:07 +0300
commitb03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 (patch)
treeaa8a970bc1cf036c71a1c3201a0cd0ed8fb66636 /block/blk-mq.c
parent37aadc687ab441bbcb693ddae613acf9afcea1ab (diff)
downloadlinux-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.xz
sched: Introduce task_is_running()
Replace a bunch of 'p->state == TASK_RUNNING' with a new helper: task_is_running(p). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210611082838.222401495@infradead.org
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 c86c01bfecdb..655db5fb46d0 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -3926,7 +3926,7 @@ int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
if (signal_pending_state(state, current))
__set_current_state(TASK_RUNNING);
- if (current->state == TASK_RUNNING)
+ if (task_is_running(current))
return 1;
if (ret < 0 || !spin)
break;