aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index f8e609ff1893..93cee3671332 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -193,7 +193,7 @@ int is_orphaned_pgrp(int pgrp)
193 return retval; 193 return retval;
194} 194}
195 195
196static inline int has_stopped_jobs(int pgrp) 196static int has_stopped_jobs(int pgrp)
197{ 197{
198 int retval = 0; 198 int retval = 0;
199 struct task_struct *p; 199 struct task_struct *p;
@@ -230,7 +230,7 @@ static inline int has_stopped_jobs(int pgrp)
230 * 230 *
231 * NOTE that reparent_to_init() gives the caller full capabilities. 231 * NOTE that reparent_to_init() gives the caller full capabilities.
232 */ 232 */
233static inline void reparent_to_init(void) 233static void reparent_to_init(void)
234{ 234{
235 write_lock_irq(&tasklist_lock); 235 write_lock_irq(&tasklist_lock);
236 236
@@ -244,7 +244,9 @@ static inline void reparent_to_init(void)
244 /* Set the exit signal to SIGCHLD so we signal init on exit */ 244 /* Set the exit signal to SIGCHLD so we signal init on exit */
245 current->exit_signal = SIGCHLD; 245 current->exit_signal = SIGCHLD;
246 246
247 if ((current->policy == SCHED_NORMAL) && (task_nice(current) < 0)) 247 if ((current->policy == SCHED_NORMAL ||
248 current->policy == SCHED_BATCH)
249 && (task_nice(current) < 0))
248 set_user_nice(current, 0); 250 set_user_nice(current, 0);
249 /* cpus_allowed? */ 251 /* cpus_allowed? */
250 /* rt_priority? */ 252 /* rt_priority? */
@@ -367,7 +369,7 @@ void daemonize(const char *name, ...)
367 369
368EXPORT_SYMBOL(daemonize); 370EXPORT_SYMBOL(daemonize);
369 371
370static inline void close_files(struct files_struct * files) 372static void close_files(struct files_struct * files)
371{ 373{
372 int i, j; 374 int i, j;
373 struct fdtable *fdt; 375 struct fdtable *fdt;
@@ -541,7 +543,7 @@ static inline void choose_new_parent(task_t *p, task_t *reaper, task_t *child_re
541 p->real_parent = reaper; 543 p->real_parent = reaper;
542} 544}
543 545
544static inline void reparent_thread(task_t *p, task_t *father, int traced) 546static void reparent_thread(task_t *p, task_t *father, int traced)
545{ 547{
546 /* We don't want people slaying init. */ 548 /* We don't want people slaying init. */
547 if (p->exit_signal != -1) 549 if (p->exit_signal != -1)
@@ -605,7 +607,7 @@ static inline void reparent_thread(task_t *p, task_t *father, int traced)
605 * group, and if no such member exists, give it to 607 * group, and if no such member exists, give it to
606 * the global child reaper process (ie "init") 608 * the global child reaper process (ie "init")
607 */ 609 */
608static inline void forget_original_parent(struct task_struct * father, 610static void forget_original_parent(struct task_struct * father,
609 struct list_head *to_release) 611 struct list_head *to_release)
610{ 612{
611 struct task_struct *p, *reaper = father; 613 struct task_struct *p, *reaper = father;