From: Sukadev Bhattiprolu Date: Fri, 19 Oct 2007 06:39:51 +0000 (-0700) Subject: pid namespaces: use task_pid() to find leader's pid X-Git-Tag: v2.6.24-rc1~238 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3743ca05ff464b8a9e345c08a6c9ce30485f9805;p=linux-2.6-omap-h63xx.git pid namespaces: use task_pid() to find leader's pid Use task_pid() to get leader's 'struct pid' and avoid the find_pid(). Signed-off-by: Sukadev Bhattiprolu Acked-by: Pavel Emelianov Cc: Eric W. Biederman Cc: Cedric Le Goater Cc: Dave Hansen Cc: Serge Hallyn Cc: Herbert Poetzel Cc: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/exec.c b/fs/exec.c index 4b5bbb87e49..92d2703d87b 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -857,7 +857,7 @@ static int de_thread(struct task_struct *tsk) */ detach_pid(tsk, PIDTYPE_PID); tsk->pid = leader->pid; - attach_pid(tsk, PIDTYPE_PID, find_pid(tsk->pid)); + attach_pid(tsk, PIDTYPE_PID, task_pid(leader)); transfer_pid(leader, tsk, PIDTYPE_PGID); transfer_pid(leader, tsk, PIDTYPE_SID); list_replace_rcu(&leader->tasks, &tsk->tasks);