2/2 daemonize calls reparent_to_init() cleanup
Subsystems (13)
PATCH 1/1 2/2 daemonize calls reparent_to_init() cleanup
Name: daemonize() calls reparent_to_init cleanup
Author: Rusty Russell
Status: Cleanup
D: This makes daemonize() call reparent_to_init() itself, as long
D: suggested for 2.5, and fixes the callers so they don't call it again.
D: Also fixes callers which set current->tty to NULL themselves (also
D: no longer neccessary).
kernel/exit.c +2 -0
@@ -233,6 +233,8 @@ void daemonize(void)exit_files (current); current->files = init_task.files;atomic_inc (¤t->files->count); + +reparent_to_init (); }static void reparent_thread (task_t *p,task_t *reaper,task_t *child_reaper)
kernel/ksyms.c +0 -1
@@ -524,7 +524,6 @@ EXPORT_SYMBOL(secure_tcp_sequence_numberEXPORT_SYMBOL (get_random_bytes);EXPORT_SYMBOL (securebits);EXPORT_SYMBOL (cap_bset); -EXPORT_SYMBOL (reparent_to_init);EXPORT_SYMBOL (daemonize);EXPORT_SYMBOL (csum_partial);/* for networking and md */ EXPORT_SYMBOL (seq_escape);
drivers/char/hvc_console.c +0 -1
@@ -232,7 +232,6 @@ int khvcd(void *unused)int i;daemonize (); -reparent_to_init ();strcpy (current->comm,"khvcd" );sigfillset (¤t->blocked);
drivers/hotplug/ibmphp_hpc.c +0 -1
@@ -1025,7 +1025,6 @@ static int hpc_poll_thread (void *data)debug ("%s - Entry\n" , __FUNCTION__);lock_kernel ();daemonize (); -reparent_to_init ();// New name strcpy (current->comm,"hpc_poll" );
drivers/md/md.c +0 -1
@@ -2486,7 +2486,6 @@ int md_thread(void * arg)*/ daemonize (); -reparent_to_init ();sprintf (current->comm, thread->name); current->exit_signal =SIGCHLD ;
drivers/mtd/devices/blkmtd.c +0 -1
@@ -304,7 +304,6 @@ static int write_queue_task(void *data)DEBUG (1 ,"blkmtd: writetask: starting (pid = %d)\n" , tsk->pid);daemonize ();strcpy (tsk->comm,"blkmtdd" ); - tsk->tty =NULL ;spin_lock_irq (&tsk->sigmask_lock);sigfillset (&tsk->blocked);recalc_sigpending ();
drivers/net/8139too.c +1 -2
@@ -1582,8 +1582,7 @@ static int rtl8139_thread (void *data)struct rtl8139_private *tp = dev->priv;unsigned long timeout; -daemonize (); -reparent_to_init (); +daemonize ();spin_lock_irq (¤t->sigmask_lock);sigemptyset (¤t->blocked);recalc_sigpending ();
drivers/pnp/pnpbios_core.c +0 -1
@@ -612,7 +612,6 @@ static int pnp_dock_thread(void * unusedstatic struct pnp_docking_station_info now;int docked =-1 , d =0 ;daemonize (); -reparent_to_init ();strcpy (current->comm,"kpnpbiosd" );while (!unloading && !signal_pending (current)) {
drivers/scsi/scsi_error.c +0 -1
@@ -1878,7 +1878,6 @@ void scsi_error_handler(void *data)*/ daemonize (); -reparent_to_init ();/* * Set the name of this process.
drivers/usb/storage/usb.c +0 -1
@@ -309,7 +309,6 @@ static int usb_stor_control_thread(void* so get rid of all our resources.. */ daemonize (); -reparent_to_init ();/* avoid getting signals */ spin_lock_irq (¤t->sigmask_lock);
fs/jffs2/background.c +0 -1
@@ -83,7 +83,6 @@ static int jffs2_garbage_collect_thread(struct jffs2_sb_info *c = _c;daemonize (); - current->tty =NULL ; c->gc_task = current;up (&c->gc_thread_start);
fs/jfs/jfs_logmgr.c +0 -1
@@ -2114,7 +2114,6 @@ int jfsIOWait(void *arg)lock_kernel ();daemonize (); - current->tty =NULL ;strcpy (current->comm,"jfsIO" );unlock_kernel ();
fs/jfs/jfs_txnmgr.c +0 -2
@@ -2763,7 +2763,6 @@ int jfs_lazycommit(void *arg)lock_kernel ();daemonize (); - current->tty =NULL ;strcpy (current->comm,"jfsCommit" );unlock_kernel ();
@@ -2961,7 +2960,6 @@ int jfs_sync(void *arg)lock_kernel ();daemonize (); - current->tty =NULL ;strcpy (current->comm,"jfsSync" );unlock_kernel ();
fs/lockd/clntlock.c +0 -1
@@ -202,7 +202,6 @@ reclaimer(void *ptr)struct inode *inode;daemonize (); -reparent_to_init ();snprintf (current->comm,sizeof (current->comm),"%s-reclaim" , host->h_name);
fs/lockd/svc.c +0 -1
@@ -98,7 +98,6 @@ lockd(struct svc_rqst *rqstp)up (&lockd_start);daemonize (); -reparent_to_init ();sprintf (current->comm,"lockd" );/* Process request with signals blocked. */
mm/pdflush.c +0 -1
@@ -88,7 +88,6 @@ struct pdflush_work {static int __pdflush (struct pdflush_work *my_work) {daemonize (); -reparent_to_init ();strcpy (current->comm,"pdflush" );/* interruptible sleep, so block all signals */
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.