summaryrefslogtreecommitdiff
path: root/kernel/sched/fair.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-09-06 13:33:04 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-09-07 22:53:47 +0300
commit0b9d46fc5ef7a457cc635b30b010081228cb81ac (patch)
tree715488f2910738159a840633ae1f5ba412805980 /kernel/sched/fair.c
parent96c1c0cfe493a7ed549169a6f044bbb83e490fb5 (diff)
downloadlinux-0b9d46fc5ef7a457cc635b30b010081228cb81ac.tar.xz
sched: Rename task_running() to task_on_cpu()
There is some ambiguity about task_running() in that it is unrelated to TASK_RUNNING but instead tests ->on_cpu. As such, rename the thing task_on_cpu(). Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/Yxhkhn55uHZx+NGl@hirez.programming.kicks-ass.net
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r--kernel/sched/fair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7bad641faef9..4e5b171b1171 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7935,7 +7935,7 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
/* Record that we found at least one task that could run on dst_cpu */
env->flags &= ~LBF_ALL_PINNED;
- if (task_running(env->src_rq, p)) {
+ if (task_on_cpu(env->src_rq, p)) {
schedstat_inc(p->stats.nr_failed_migrations_running);
return 0;
}