sched/core: Reuse put_prev_task()
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 24 May 2017 05:29:53 +0000 (10:59 +0530)
committerIngo Molnar <mingo@kernel.org>
Thu, 10 Aug 2017 10:18:10 +0000 (12:18 +0200)
Reuse put_prev_task() instead of copying its implementation.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linaro-kernel@lists.linaro.org
Link: http://lkml.kernel.org/r/e2e50578223d05c5e90a9feb964fe1ec5d09a052.1495603536.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c

index 0869b20fba81f6f1a7f5f73bde65fadc483f0fa2..835a234d35e8db86862a2b4c47b34fc34d6e30d6 100644 (file)
@@ -5438,7 +5438,7 @@ static void migrate_tasks(struct rq *dead_rq, struct rq_flags *rf)
                 */
                next = pick_next_task(rq, &fake_task, rf);
                BUG_ON(!next);
-               next->sched_class->put_prev_task(rq, next);
+               put_prev_task(rq, next);
 
                /*
                 * Rules for changing task_struct::cpus_allowed are holding