All of lore.kernel.org
 help / color / mirror / Atom feed
From: sukadev@us.ibm.com
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Cc: Containers <containers@lists.osdl.org>,
	Oleg Nesterov <oleg@tv-sign.ru>,
	Pavel Emelianov <xemul@openvz.org>
Subject: [PATCH 3/5] [V2] Use task_pid() to find leader's pid
Date: Thu, 19 Jul 2007 00:20:52 -0700	[thread overview]
Message-ID: <20070719072052.GC28216@us.ibm.com> (raw)
In-Reply-To: <20070719071206.GE10195@us.ibm.com>


Subject: [PATCH 3/5] Use task_pid() to find leader's pid

From: Sukadev Bhattiprolu <sukadev@us.ibm.com>

Use task_pid() to get leader's 'struct pid' and avoid the find_pid().

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Acked-by: Pavel Emelianov <xemul@openvz.org>

Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Herbert Poetzel <herbert@13thfloor.at>
---
 fs/exec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: lx26-22-rc6-mm1a/fs/exec.c
===================================================================
--- lx26-22-rc6-mm1a.orig/fs/exec.c	2007-07-13 18:23:55.000000000 -0700
+++ lx26-22-rc6-mm1a/fs/exec.c	2007-07-16 12:56:22.000000000 -0700
@@ -908,7 +908,7 @@ static int de_thread(struct task_struct 
 		 */
 		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);

  parent reply	other threads:[~2007-07-19  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19  7:12 [PATCH 0/5][V2] Misc helper patches for pid namespaces sukadev
2007-07-19  7:19 ` [PATCH 1/5] [V2] Define and use task_active_pid_ns() wrapper sukadev
2007-07-19  7:20 ` [PATCH 2/5] [V2] Rename child_reaper() function sukadev
2007-07-19  7:20 ` sukadev [this message]
2007-07-19  7:21 ` [PATCH 4/5] [V2] Define is_global_init() and is_container_init() sukadev
2007-07-20 22:41   ` Andrew Morton
2007-07-21  3:02     ` sukadev
2007-07-19  7:22 ` [PATCH 5/5] [V2] Move alloc_pid() to copy_process() sukadev
     [not found]   ` <20070719072240.GE28216-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-07-19  7:44     ` Pavel Emelyanov
2007-07-19  7:44       ` Pavel Emelyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070719072052.GC28216@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.