summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-18 23:40:05 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 11:53:39 -0700
commit8ef047aaaeb811247a5639c92e2f2ae1221a28dd (patch)
tree296a61f66daa8ac42b3d77a53d06a97eb71155c9 /include/linux
parentfaacbfd3a6808bf87d8f353b42eceeaba2c78a47 (diff)
downloadop-kernel-dev-8ef047aaaeb811247a5639c92e2f2ae1221a28dd.zip
op-kernel-dev-8ef047aaaeb811247a5639c92e2f2ae1221a28dd.tar.gz
pid namespaces: make alloc_pid(), free_pid() and put_pid() work with struct upid
Each struct upid element of struct pid has to be initialized properly, i.e. its nr mst be allocated from appropriate pidmap and ns set to appropriate namespace. When allocating a new pid, we need to know the namespace this pid will live in, so the additional argument is added to alloc_pid(). On the other hand, the rest of the kernel still uses the pid->nr and pid->pid_chain fields, so these ones are still initialized, but this will be removed soon. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Paul Menage <menage@google.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h
index e5865a9..67470ad 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -111,7 +111,7 @@ extern struct pid *FASTCALL(find_pid(int nr));
extern struct pid *find_get_pid(int nr);
extern struct pid *find_ge_pid(int nr);
-extern struct pid *alloc_pid(void);
+extern struct pid *alloc_pid(struct pid_namespace *ns);
extern void FASTCALL(free_pid(struct pid *pid));
static inline pid_t pid_nr(struct pid *pid)
OpenPOWER on IntegriCloud