Commit 1c573afe authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] reparent_to_init(): use has_rt_policy()

Remove open-coded has_rt_policy(), no changes in kernel/exit.o
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8dc3e909
......@@ -281,9 +281,7 @@ static void reparent_to_init(void)
/* Set the exit signal to SIGCHLD so we signal init on exit */
current->exit_signal = SIGCHLD;
if ((current->policy == SCHED_NORMAL ||
current->policy == SCHED_BATCH)
&& (task_nice(current) < 0))
if (!has_rt_policy(current) && (task_nice(current) < 0))
set_user_nice(current, 0);
/* cpus_allowed? */
/* rt_priority? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment