aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-30 00:54:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:48 -0700
commit5cd204550b1a006f2b0c986b0e0f53220ebfd391 (patch)
treeee0f5e042072d4d2f4a3c6cd6e3a8b60676868ae /include/linux
parentUse find_task_by_vpid in taskstats (diff)
downloadlinux-dev-5cd204550b1a006f2b0c986b0e0f53220ebfd391.tar.xz
linux-dev-5cd204550b1a006f2b0c986b0e0f53220ebfd391.zip
Deprecate find_task_by_pid()
There are some places that are known to operate on tasks' global pids only: * the rest_init() call (called on boot) * the kgdb's getthread * the create_kthread() (since the kthread is run in init ns) So use the find_task_by_pid_ns(..., &init_pid_ns) there and schedule the find_task_by_pid for removal. [sukadev@us.ibm.com: Fix warning in kernel/pid.c] Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.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/sched.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 86e60796db62..03c238088aee 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1677,7 +1677,10 @@ extern struct pid_namespace init_pid_ns;
extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
struct pid_namespace *ns);
-extern struct task_struct *find_task_by_pid(pid_t nr);
+static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr)
+{
+ return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
+}
extern struct task_struct *find_task_by_vpid(pid_t nr);
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
struct pid_namespace *ns);