Commit 9325c684 authored by Linus Torvalds's avatar Linus Torvalds

Use CLONE_KERNEL for the common kernel thread flags.

parent 63540cea
......@@ -286,7 +286,7 @@ int __init hvc_init(void)
panic("Couldn't register hvc console driver\n");
if (hvc_driver.num > 0)
kernel_thread(khvcd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
kernel_thread(khvcd, NULL, CLONE_KERNEL);
return 0;
}
......
......@@ -1299,7 +1299,7 @@ static int __init pnpbios_thread_init(void)
{
#ifdef CONFIG_HOTPLUG
init_completion(&unload_sem);
if(kernel_thread(pnp_dock_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL)>0)
if (kernel_thread(pnp_dock_thread, NULL, CLONE_KERNEL) > 0)
unloading = 0;
#endif
return 0;
......
......@@ -522,7 +522,7 @@ static inline void put_proc_dentry(struct dentry *dentry)
* This function makes sure the current process has its own signal table,
* so that flush_signal_handlers can later reset the handlers without
* disturbing other processes. (Other processes might share the signal
* table via the CLONE_SIGNAL option to clone().)
* table via the CLONE_SIGHAND option to clone().)
*/
static inline int de_thread(struct signal_struct *oldsig)
{
......
......@@ -188,7 +188,7 @@ nlmclnt_recovery(struct nlm_host *host, u32 newstate)
nlmclnt_prepare_reclaim(host, newstate);
nlm_get_host(host);
MOD_INC_USE_COUNT;
kernel_thread(reclaimer, host, CLONE_SIGNAL);
kernel_thread(reclaimer, host, CLONE_KERNEL);
}
}
......
......@@ -51,7 +51,11 @@ struct exec_domain;
#define CLONE_CLEARTID 0x00200000 /* clear the userspace TID */
#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */
#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD)
/*
* List of flags we want to share for kernel threads,
* if only because they are not used by them anyway.
*/
#define CLONE_KERNEL (CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
/*
* These are the constant used to fake the fixed-point load-average
......
......@@ -371,7 +371,7 @@ static void __init smp_init(void)
static void rest_init(void)
{
kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
kernel_thread(init, NULL, CLONE_KERNEL);
unlock_kernel();
cpu_idle();
}
......
......@@ -2055,8 +2055,7 @@ static int migration_call(struct notifier_block *nfb,
case CPU_ONLINE:
printk("Starting migration thread for cpu %li\n",
(long)hcpu);
kernel_thread(migration_thread, hcpu,
CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
kernel_thread(migration_thread, hcpu, CLONE_KERNEL);
while (!cpu_rq((long)hcpu)->migration_thread)
yield();
break;
......
......@@ -395,8 +395,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb,
int hotcpu = (unsigned long)hcpu;
if (action == CPU_ONLINE) {
if (kernel_thread(ksoftirqd, hcpu,
CLONE_FS | CLONE_FILES | CLONE_SIGNAL) < 0) {
if (kernel_thread(ksoftirqd, hcpu, CLONE_KERNEL) < 0) {
printk("ksoftirqd for %i failed\n", hotcpu);
return NOTIFY_BAD;
}
......
......@@ -202,8 +202,7 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0)
static void start_one_pdflush_thread(void)
{
kernel_thread(pdflush, NULL,
CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
kernel_thread(pdflush, NULL, CLONE_KERNEL);
}
static int __init pdflush_init(void)
......
......@@ -705,7 +705,7 @@ static int __init kswapd_init(void)
{
printk("Starting kswapd\n");
swap_setup();
kernel_thread(kswapd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
kernel_thread(kswapd, NULL, CLONE_KERNEL);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment