aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/deadline.c
diff options
context:
space:
mode:
authorHui Su <sh_def@163.com>2020-10-31 01:32:23 +0800
committerPeter Zijlstra <peterz@infradead.org>2021-01-14 11:20:11 +0100
commit65bcf072e20ed7597caa902f170f293662b0af3c (patch)
tree9f38c6fa85339a674e748e3391e94931ea2b3998 /kernel/sched/deadline.c
parentsched/fair: Reduce cases for active balance (diff)
downloadlinux-dev-65bcf072e20ed7597caa902f170f293662b0af3c.tar.xz
linux-dev-65bcf072e20ed7597caa902f170f293662b0af3c.zip
sched: Use task_current() instead of 'rq->curr == p'
Use the task_current() function where appropriate. No functional change. Signed-off-by: Hui Su <sh_def@163.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Link: https://lkml.kernel.org/r/20201030173223.GA52339@rlk
Diffstat (limited to 'kernel/sched/deadline.c')
-rw-r--r--kernel/sched/deadline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 75686c6d4436..5421782fe897 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2514,7 +2514,7 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
static void prio_changed_dl(struct rq *rq, struct task_struct *p,
int oldprio)
{
- if (task_on_rq_queued(p) || rq->curr == p) {
+ if (task_on_rq_queued(p) || task_current(rq, p)) {
#ifdef CONFIG_SMP
/*
* This might be too much, but unfortunately