提交 1c573afe 编写于 作者: O Oleg Nesterov 提交者: 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: NOleg 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: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册