diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-25 04:48:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:45 -0400 |
commit | dbda0de52618d13d1b927c7ba7bb839cfddc4e8c (patch) | |
tree | 026bd6c9da6e6e81a21a6e47dcc738bddbb3fe22 | |
parent | e49859e71e0318b564de1546bdc30fab738f9deb (diff) |
pidns: remove find_task_by_pid, unused for a long time
It seems to me that it was a mistake marking this function as deprecated
and scheduling it for removal, rather than resolutely removing it after
the last caller's death.
Anyway - better late, then never.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
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>
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 18 | ||||
-rw-r--r-- | include/linux/pid.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 6 |
3 files changed, 1 insertions, 25 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 09c4a1efb8e3..721c71b86e06 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -138,24 +138,6 @@ Who: Kay Sievers <kay.sievers@suse.de> | |||
138 | 138 | ||
139 | --------------------------- | 139 | --------------------------- |
140 | 140 | ||
141 | What: find_task_by_pid | ||
142 | When: 2.6.26 | ||
143 | Why: With pid namespaces, calling this funciton will return the | ||
144 | wrong task when called from inside a namespace. | ||
145 | |||
146 | The best way to save a task pid and find a task by this | ||
147 | pid later, is to find this task's struct pid pointer (or get | ||
148 | it directly from the task) and call pid_task() later. | ||
149 | |||
150 | If someone really needs to get a task by its pid_t, then | ||
151 | he most likely needs the find_task_by_vpid() to get the | ||
152 | task from the same namespace as the current task is in, but | ||
153 | this may be not so in general. | ||
154 | |||
155 | Who: Pavel Emelyanov <xemul@openvz.org> | ||
156 | |||
157 | --------------------------- | ||
158 | |||
159 | What: ACPI procfs interface | 141 | What: ACPI procfs interface |
160 | When: July 2008 | 142 | When: July 2008 |
161 | Why: ACPI sysfs conversion should be finished by January 2008. | 143 | Why: ACPI sysfs conversion should be finished by January 2008. |
diff --git a/include/linux/pid.h b/include/linux/pid.h index ff1b2a5814d4..22921ac4cfd9 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -107,7 +107,7 @@ extern struct pid_namespace init_pid_ns; | |||
107 | * find_pid_ns() finds the pid in the namespace specified | 107 | * find_pid_ns() finds the pid in the namespace specified |
108 | * find_vpid() finr the pid by its virtual id, i.e. in the current namespace | 108 | * find_vpid() finr the pid by its virtual id, i.e. in the current namespace |
109 | * | 109 | * |
110 | * see also find_task_by_pid() set in include/linux/sched.h | 110 | * see also find_task_by_vpid() set in include/linux/sched.h |
111 | */ | 111 | */ |
112 | extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); | 112 | extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); |
113 | extern struct pid *find_vpid(int nr); | 113 | extern struct pid *find_vpid(int nr); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 182da1550fad..354ef478a80d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1715,8 +1715,6 @@ extern struct pid_namespace init_pid_ns; | |||
1715 | * finds a task by its pid in the specified namespace | 1715 | * finds a task by its pid in the specified namespace |
1716 | * find_task_by_vpid(): | 1716 | * find_task_by_vpid(): |
1717 | * finds a task by its virtual pid | 1717 | * finds a task by its virtual pid |
1718 | * find_task_by_pid(): | ||
1719 | * finds a task by its global pid | ||
1720 | * | 1718 | * |
1721 | * see also find_vpid() etc in include/linux/pid.h | 1719 | * see also find_vpid() etc in include/linux/pid.h |
1722 | */ | 1720 | */ |
@@ -1724,10 +1722,6 @@ extern struct pid_namespace init_pid_ns; | |||
1724 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | 1722 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, |
1725 | struct pid_namespace *ns); | 1723 | struct pid_namespace *ns); |
1726 | 1724 | ||
1727 | static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr) | ||
1728 | { | ||
1729 | return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns); | ||
1730 | } | ||
1731 | extern struct task_struct *find_task_by_vpid(pid_t nr); | 1725 | extern struct task_struct *find_task_by_vpid(pid_t nr); |
1732 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1726 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
1733 | struct pid_namespace *ns); | 1727 | struct pid_namespace *ns); |