pids: clean up find_task_by_pid variants
find_task_by_pid_type_ns is only used to implement find_task_by_vpid and find_task_by_pid_ns, but both of them pass PIDTYPE_PID as first argument. So just fold find_task_by_pid_type_ns into find_task_by_pid_ns and use find_task_by_pid_ns to implement find_task_by_vpid. While we're at it also remove the exports for find_task_by_pid_ns and find_task_by_vpid - we don't have any modular callers left as the only modular caller of he old pre pid namespace find_task_by_pid (gfs2) was switched to pid_task which operates on a struct pid pointer instead of a pid_t. Given the confusion about pid_t values vs namespace that's generally the better option anyway and I think we're better of restricting modules to do it that way. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
7338f29984
commit
17f98dcf60
@@ -1878,9 +1878,6 @@ extern struct pid_namespace init_pid_ns;
|
||||
/*
|
||||
* find a task by one of its numerical ids
|
||||
*
|
||||
* find_task_by_pid_type_ns():
|
||||
* it is the most generic call - it finds a task by all id,
|
||||
* type and namespace specified
|
||||
* find_task_by_pid_ns():
|
||||
* finds a task by its pid in the specified namespace
|
||||
* find_task_by_vpid():
|
||||
@@ -1889,9 +1886,6 @@ extern struct pid_namespace init_pid_ns;
|
||||
* see also find_vpid() etc in include/linux/pid.h
|
||||
*/
|
||||
|
||||
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_vpid(pid_t nr);
|
||||
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
|
||||
struct pid_namespace *ns);
|
||||
|
Reference in New Issue
Block a user