sched/core: Delete PF_EXITING checks from cpu_cgroup_exit() callback
authorKirill Tkhai <ktkhai@odin.com>
Mon, 31 Aug 2015 12:12:56 +0000 (15:12 +0300)
committerIngo Molnar <mingo@kernel.org>
Sun, 13 Sep 2015 07:52:51 +0000 (09:52 +0200)
cgroup_exit() is not called from copy_process() after commit:

  e8604cb43690 ("cgroup: fix spurious lockdep warning in cgroup_exit()")

from do_exit(). So this check is useless and the comment is obsolete.

Signed-off-by: Kirill Tkhai <ktkhai@odin.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/55E444C8.3020402@odin.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c

index 7c099e69fd5eefd1ca4fd06152408a8492867282..37ab6f9f0d1e5853e5dd5f0e7a882cfc7ad060d1 100644 (file)
@@ -8193,14 +8193,6 @@ static void cpu_cgroup_exit(struct cgroup_subsys_state *css,
                            struct cgroup_subsys_state *old_css,
                            struct task_struct *task)
 {
-       /*
-        * cgroup_exit() is called in the copy_process() failure path.
-        * Ignore this case since the task hasn't ran yet, this avoids
-        * trying to poke a half freed task state from generic code.
-        */
-       if (!(task->flags & PF_EXITING))
-               return;
-
        sched_move_task(task);
 }