Commit 863c4a16 authored by Albert Cahalan's avatar Albert Cahalan Committed by Linus Torvalds

[PATCH] use CLONE_KERNEL

This uses CLONE_KERNEL in place of the individual
flags, only changing the places where it is an exact
match.

I strongly suspect that CLONE_KERNEL ought to be
used in many more places, but they require a more
careful examination.
parent cc1d0685
......@@ -329,8 +329,7 @@ ecard_call(struct ecard_request *req)
BUG();
if (ecard_pid <= 0)
ecard_pid = kernel_thread(ecard_task, NULL,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
ecard_pid = kernel_thread(ecard_task, NULL, CLONE_KERNEL);
ecard_req = req;
wake_up(&ecard_wait);
......
......@@ -2008,7 +2008,7 @@ static int __init apm_init(void)
if (apm_proc)
apm_proc->owner = THIS_MODULE;
kernel_thread(apm, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD);
kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD);
if (num_online_cpus() > 1 && !smp ) {
printk(KERN_NOTICE
......
......@@ -493,7 +493,7 @@ linkstatd_init(void)
spin_lock_init(&sn_linkstats_lock);
sn_linkstats = kmalloc(numnodes * sizeof(struct s_linkstats), GFP_KERNEL);
sn_linkstats_reset(60000UL); /* default 60 second update interval */
kernel_thread(linkstatd_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
kernel_thread(linkstatd_thread, NULL, CLONE_KERNEL);
return 0;
}
......
......@@ -757,7 +757,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
blk_queue_merge_bvec(lo->lo_queue, q->merge_bvec_fn);
}
kernel_thread(loop_thread, lo, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
kernel_thread(loop_thread, lo, CLONE_KERNEL);
down(&lo->lo_sem);
fput(file);
......
......@@ -1744,8 +1744,7 @@ static void nodemgr_add_host(struct hpsb_host *host)
sprintf(hi->daemon_name, "knodemgrd_%d", host->id);
hi->pid = kernel_thread(nodemgr_host_thread, hi,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
hi->pid = kernel_thread(nodemgr_host_thread, hi, CLONE_KERNEL);
if (hi->pid < 0) {
HPSB_ERR ("NodeMgr: failed to start %s thread for %s",
......
......@@ -248,8 +248,7 @@ static int __init serio_init(void)
{
int pid;
pid = kernel_thread(serio_thread, NULL,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
pid = kernel_thread(serio_thread, NULL, CLONE_KERNEL);
if (!pid) {
printk(KERN_WARNING "serio: Failed to start kseriod\n");
......
......@@ -293,7 +293,7 @@ diva_init_thread(void)
{
int pid = 0;
pid = kernel_thread(divad_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
pid = kernel_thread(divad_thread, NULL, CLONE_KERNEL);
if (pid >= 0) {
divad_pid = pid;
}
......
......@@ -266,8 +266,7 @@ adb_probe_task(void *x)
static void
__adb_probe_task(void *data)
{
adb_probe_task_pid = kernel_thread(adb_probe_task, NULL,
SIGCHLD | CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
adb_probe_task_pid = kernel_thread(adb_probe_task, NULL, SIGCHLD | CLONE_KERNEL);
}
static DECLARE_WORK(adb_reset_work, __adb_probe_task, NULL);
......
......@@ -694,8 +694,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_ma
/* Startup kernel thread */
if (i == 0)
kernel_thread(media_bay_task, NULL,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
kernel_thread(media_bay_task, NULL, CLONE_KERNEL);
return 0;
......
......@@ -397,8 +397,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
tr->blkcore_priv->rq->queuedata = tr;
ret = kernel_thread(mtd_blktrans_thread, tr,
CLONE_FS|CLONE_FILES|CLONE_SIGHAND);
ret = kernel_thread(mtd_blktrans_thread, tr, CLONE_KERNEL);
if (ret < 0) {
blk_cleanup_queue(tr->blkcore_priv->rq);
unregister_blkdev(tr->major, tr->name);
......
......@@ -1182,8 +1182,7 @@ int usb_hub_init(void)
return -1;
}
pid = kernel_thread(hub_thread, NULL,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
pid = kernel_thread(hub_thread, NULL, CLONE_KERNEL);
if (pid >= 0) {
khubd_pid = pid;
......
......@@ -139,7 +139,7 @@ static int jffs_fill_super(struct super_block *sb, void *data, int silent)
c->thread_pid = kernel_thread (jffs_garbage_collect_thread,
(void *) c,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
CLONE_KERNEL);
D1(printk(KERN_NOTICE "JFFS: GC thread pid=%d.\n", (int) c->thread_pid));
D1(printk(KERN_NOTICE "JFFS: Successfully mounted device %s.\n",
......
......@@ -501,24 +501,21 @@ static int __init init_jfs_fs(void)
/*
* I/O completion thread (endio)
*/
jfsIOthread = kernel_thread(jfsIOWait, 0,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
jfsIOthread = kernel_thread(jfsIOWait, 0, CLONE_KERNEL);
if (jfsIOthread < 0) {
jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsIOthread);
goto end_txmngr;
}
wait_for_completion(&jfsIOwait); /* Wait until thread starts */
jfsCommitThread = kernel_thread(jfs_lazycommit, 0,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
jfsCommitThread = kernel_thread(jfs_lazycommit, 0, CLONE_KERNEL);
if (jfsCommitThread < 0) {
jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsCommitThread);
goto kill_iotask;
}
wait_for_completion(&jfsIOwait); /* Wait until thread starts */
jfsSyncThread = kernel_thread(jfs_sync, 0,
CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
jfsSyncThread = kernel_thread(jfs_sync, 0, CLONE_KERNEL);
if (jfsSyncThread < 0) {
jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsSyncThread);
goto kill_committask;
......
......@@ -574,7 +574,7 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
__bnep_link_session(s);
err = kernel_thread(bnep_session, s, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
err = kernel_thread(bnep_session, s, CLONE_KERNEL);
if (err < 0) {
/* Session thread start failed, gotta cleanup. */
unregister_netdev(dev);
......
......@@ -1957,7 +1957,7 @@ int __init rfcomm_init(void)
{
l2cap_load();
kernel_thread(rfcomm_run, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
kernel_thread(rfcomm_run, NULL, CLONE_KERNEL);
BT_INFO("RFCOMM ver %s", VERSION);
......
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