Skip to content

Commit e49859e

Browse files
xemultorvalds
authored andcommitted
pidns: remove now unused find_pid function.
This one had the only users so far - the kill_proc, which is removed, so drop this (invalid in namespaced world) call too. And of course - erase all references on it from comments. 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>
1 parent 19b0cfc commit e49859e

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

‎include/linux/pid.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum pid_type
4848
*/
4949

5050
struct upid {
51-
/* Try to keep pid_chain in the same cacheline as nr for find_pid */
51+
/* Try to keep pid_chain in the same cacheline as nr for find_vpid */
5252
int nr;
5353
struct pid_namespace *ns;
5454
struct hlist_node pid_chain;
@@ -105,14 +105,12 @@ extern struct pid_namespace init_pid_ns;
105105
* or rcu_read_lock() held.
106106
*
107107
* find_pid_ns() finds the pid in the namespace specified
108-
* find_pid() find the pid by its global id, i.e. in the init namespace
109108
* find_vpid() finr the pid by its virtual id, i.e. in the current namespace
110109
*
111110
* see also find_task_by_pid() set in include/linux/sched.h
112111
*/
113112
extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
114113
extern struct pid *find_vpid(int nr);
115-
extern struct pid *find_pid(int nr);
116114

117115
/*
118116
* Lookup a PID in the hash table, and return with it's count elevated.

‎include/linux/sched.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ extern struct pid_namespace init_pid_ns;
17181718
* find_task_by_pid():
17191719
* finds a task by its global pid
17201720
*
1721-
* see also find_pid() etc in include/linux/pid.h
1721+
* see also find_vpid() etc in include/linux/pid.h
17221722
*/
17231723

17241724
extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,

‎kernel/pid.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,6 @@ struct pid *find_vpid(int nr)
309309
}
310310
EXPORT_SYMBOL_GPL(find_vpid);
311311

312-
struct pid *find_pid(int nr)
313-
{
314-
return find_pid_ns(nr, &init_pid_ns);
315-
}
316-
EXPORT_SYMBOL_GPL(find_pid);
317-
318312
/*
319313
* attach_pid() must be called with the tasklist_lock write-held.
320314
*/
@@ -483,7 +477,7 @@ EXPORT_SYMBOL(task_session_nr_ns);
483477
/*
484478
* Used by proc to find the first pid that is greater then or equal to nr.
485479
*
486-
* If there is a pid at nr this function is exactly the same as find_pid.
480+
* If there is a pid at nr this function is exactly the same as find_pid_ns.
487481
*/
488482
struct pid *find_ge_pid(int nr, struct pid_namespace *ns)
489483
{

0 commit comments

Comments
 (0)