diff options
| -rw-r--r-- | include/linux/pid.h | 4 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | kernel/pid.c | 8 |
3 files changed, 3 insertions, 11 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index 6f084b9e2c40..ff1b2a5814d4 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
| @@ -48,7 +48,7 @@ enum pid_type | |||
| 48 | */ | 48 | */ |
| 49 | 49 | ||
| 50 | struct upid { | 50 | 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 */ |
| 52 | int nr; | 52 | int nr; |
| 53 | struct pid_namespace *ns; | 53 | struct pid_namespace *ns; |
| 54 | struct hlist_node pid_chain; | 54 | struct hlist_node pid_chain; |
| @@ -105,14 +105,12 @@ extern struct pid_namespace init_pid_ns; | |||
| 105 | * or rcu_read_lock() held. | 105 | * or rcu_read_lock() held. |
| 106 | * | 106 | * |
| 107 | * find_pid_ns() finds the pid in the namespace specified | 107 | * 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 | ||
| 109 | * 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 |
| 110 | * | 109 | * |
| 111 | * see also find_task_by_pid() set in include/linux/sched.h | 110 | * see also find_task_by_pid() set in include/linux/sched.h |
| 112 | */ | 111 | */ |
| 113 | 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); |
| 114 | extern struct pid *find_vpid(int nr); | 113 | extern struct pid *find_vpid(int nr); |
| 115 | extern struct pid *find_pid(int nr); | ||
| 116 | 114 | ||
| 117 | /* | 115 | /* |
| 118 | * Lookup a PID in the hash table, and return with it's count elevated. | 116 | * Lookup a PID in the hash table, and return with it's count elevated. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 134cb5cb506c..182da1550fad 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1718,7 +1718,7 @@ extern struct pid_namespace init_pid_ns; | |||
| 1718 | * find_task_by_pid(): | 1718 | * find_task_by_pid(): |
| 1719 | * finds a task by its global pid | 1719 | * finds a task by its global pid |
| 1720 | * | 1720 | * |
| 1721 | * see also find_pid() etc in include/linux/pid.h | 1721 | * see also find_vpid() etc in include/linux/pid.h |
| 1722 | */ | 1722 | */ |
| 1723 | 1723 | ||
| 1724 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | 1724 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, |
diff --git a/kernel/pid.c b/kernel/pid.c index 753fd90d9ec1..064e76afa507 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
| @@ -309,12 +309,6 @@ struct pid *find_vpid(int nr) | |||
| 309 | } | 309 | } |
| 310 | EXPORT_SYMBOL_GPL(find_vpid); | 310 | EXPORT_SYMBOL_GPL(find_vpid); |
| 311 | 311 | ||
| 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 | |||
| 318 | /* | 312 | /* |
| 319 | * attach_pid() must be called with the tasklist_lock write-held. | 313 | * attach_pid() must be called with the tasklist_lock write-held. |
| 320 | */ | 314 | */ |
| @@ -483,7 +477,7 @@ EXPORT_SYMBOL(task_session_nr_ns); | |||
| 483 | /* | 477 | /* |
| 484 | * Used by proc to find the first pid that is greater then or equal to nr. | 478 | * Used by proc to find the first pid that is greater then or equal to nr. |
| 485 | * | 479 | * |
| 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. |
| 487 | */ | 481 | */ |
| 488 | struct pid *find_ge_pid(int nr, struct pid_namespace *ns) | 482 | struct pid *find_ge_pid(int nr, struct pid_namespace *ns) |
| 489 | { | 483 | { |
