]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/exit.c
h63xx: tsc2101 alsa sound support
[linux-2.6-omap-h63xx.git] / kernel / exit.c
index f8e609ff1893f2d85f76f4b56cba97135b97d152..531aadca553030543b643a0553f6144785d02bb5 100644 (file)
@@ -193,7 +193,7 @@ int is_orphaned_pgrp(int pgrp)
        return retval;
 }
 
-static inline int has_stopped_jobs(int pgrp)
+static int has_stopped_jobs(int pgrp)
 {
        int retval = 0;
        struct task_struct *p;
@@ -230,7 +230,7 @@ static inline int has_stopped_jobs(int pgrp)
  *
  * NOTE that reparent_to_init() gives the caller full capabilities.
  */
-static inline void reparent_to_init(void)
+static void reparent_to_init(void)
 {
        write_lock_irq(&tasklist_lock);
 
@@ -244,7 +244,9 @@ static inline 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) && (task_nice(current) < 0))
+       if ((current->policy == SCHED_NORMAL ||
+                       current->policy == SCHED_BATCH)
+                               && (task_nice(current) < 0))
                set_user_nice(current, 0);
        /* cpus_allowed? */
        /* rt_priority? */
@@ -358,6 +360,9 @@ void daemonize(const char *name, ...)
        fs = init_task.fs;
        current->fs = fs;
        atomic_inc(&fs->count);
+       exit_namespace(current);
+       current->namespace = init_task.namespace;
+       get_namespace(current->namespace);
        exit_files(current);
        current->files = init_task.files;
        atomic_inc(&current->files->count);
@@ -367,7 +372,7 @@ void daemonize(const char *name, ...)
 
 EXPORT_SYMBOL(daemonize);
 
-static inline void close_files(struct files_struct * files)
+static void close_files(struct files_struct * files)
 {
        int i, j;
        struct fdtable *fdt;
@@ -541,7 +546,7 @@ static inline void choose_new_parent(task_t *p, task_t *reaper, task_t *child_re
        p->real_parent = reaper;
 }
 
-static inline void reparent_thread(task_t *p, task_t *father, int traced)
+static void reparent_thread(task_t *p, task_t *father, int traced)
 {
        /* We don't want people slaying init.  */
        if (p->exit_signal != -1)
@@ -605,7 +610,7 @@ static inline void reparent_thread(task_t *p, task_t *father, int traced)
  * group, and if no such member exists, give it to
  * the global child reaper process (ie "init")
  */
-static inline void forget_original_parent(struct task_struct * father,
+static void forget_original_parent(struct task_struct * father,
                                          struct list_head *to_release)
 {
        struct task_struct *p, *reaper = father;