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-Url: https://git.stricted.de/?a=commitdiff_plain;h=3743ca05ff464b8a9e345c08a6c9ce30485f9805;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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 4b5bbb87e494..92d2703d87b2 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);