aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index e4779bbb2058..b914392085f9 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -304,6 +304,15 @@ struct task_struct *find_task_by_pid_type(int type, int nr)
304 304
305EXPORT_SYMBOL(find_task_by_pid_type); 305EXPORT_SYMBOL(find_task_by_pid_type);
306 306
307struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
308{
309 struct pid *pid;
310 rcu_read_lock();
311 pid = get_pid(task->pids[type].pid);
312 rcu_read_unlock();
313 return pid;
314}
315
307struct task_struct *fastcall get_pid_task(struct pid *pid, enum pid_type type) 316struct task_struct *fastcall get_pid_task(struct pid *pid, enum pid_type type)
308{ 317{
309 struct task_struct *result; 318 struct task_struct *result;