[patch] reparent_to_init-cleanup

From: Coywolf Qi Hunt
Date: Mon Apr 11 2005 - 02:27:57 EST


Hello,

Split out from my oom-killer patch, this patch hides reparent_to_init(). reparent_to_init()
should only be called by daemonize(). This applies to 2.6.12-rc2-mm2 too.

Signed-off-by: Coywolf Qi Hunt <coywolf@xxxxxxxxxx>
---

arch/i386/mach-voyager/voyager_thread.c | 1 -
include/linux/sched.h | 1 -
kernel/exit.c | 2 +-
3 files changed, 1 insertion(+), 3 deletions(-)

diff -pruN 2.6.12-rc2-mm1/arch/i386/mach-voyager/voyager_thread.c 2.6.12-rc2-mm1-cy/arch/i386/mach-voyager/voyager_thread.c
--- 2.6.12-rc2-mm1/arch/i386/mach-voyager/voyager_thread.c 2004-08-20 14:39:58.000000000 +0800
+++ 2.6.12-rc2-mm1-cy/arch/i386/mach-voyager/voyager_thread.c 2005-04-08 18:53:06.000000000 +0800
@@ -126,7 +126,6 @@ thread(void *unused)

kvoyagerd_running = 1;

- reparent_to_init();
daemonize(THREAD_NAME);

set_timeout = 0;
diff -pruN 2.6.12-rc2-mm1/include/linux/sched.h 2.6.12-rc2-mm1-cy/include/linux/sched.h
--- 2.6.12-rc2-mm1/include/linux/sched.h 2005-04-06 10:18:18.000000000 +0800
+++ 2.6.12-rc2-mm1-cy/include/linux/sched.h 2005-04-08 18:53:06.000000000 +0800
@@ -1068,7 +1068,6 @@ extern void exit_itimers(struct signal_s

extern NORET_TYPE void do_group_exit(int);

-extern void reparent_to_init(void);
extern void daemonize(const char *, ...);
extern int allow_signal(int);
extern int disallow_signal(int);
diff -pruN 2.6.12-rc2-mm1/kernel/exit.c 2.6.12-rc2-mm1-cy/kernel/exit.c
--- 2.6.12-rc2-mm1/kernel/exit.c 2005-04-06 10:18:20.000000000 +0800
+++ 2.6.12-rc2-mm1-cy/kernel/exit.c 2005-04-08 18:53:06.000000000 +0800
@@ -224,7 +224,7 @@ static inline int has_stopped_jobs(int p
*
* NOTE that reparent_to_init() gives the caller full capabilities.
*/
-void reparent_to_init(void)
+static inline void reparent_to_init(void)
{
write_lock_irq(&tasklist_lock);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/