kernel/fork.c:copy_process(): don't add the uninitialized child to thread/task/pid...
[deliverable/linux.git] / kernel / pid.c
index 0db3e791a06d48594606bc4789bc8fbe0fd5a4f0..61980cefb1f5e465cb4a6dae00a93b612d282e42 100644 (file)
@@ -373,14 +373,10 @@ EXPORT_SYMBOL_GPL(find_vpid);
 /*
  * attach_pid() must be called with the tasklist_lock write-held.
  */
-void attach_pid(struct task_struct *task, enum pid_type type,
-               struct pid *pid)
+void attach_pid(struct task_struct *task, enum pid_type type)
 {
-       struct pid_link *link;
-
-       link = &task->pids[type];
-       link->pid = pid;
-       hlist_add_head_rcu(&link->node, &pid->tasks[type]);
+       struct pid_link *link = &task->pids[type];
+       hlist_add_head_rcu(&link->node, &link->pid->tasks[type]);
 }
 
 static void __change_pid(struct task_struct *task, enum pid_type type,
@@ -412,7 +408,7 @@ void change_pid(struct task_struct *task, enum pid_type type,
                struct pid *pid)
 {
        __change_pid(task, type, pid);
-       attach_pid(task, type, pid);
+       attach_pid(task, type);
 }
 
 /* transfer_pid is an optimization of attach_pid(new), detach_pid(old) */
This page took 0.027804 seconds and 5 git commands to generate.