X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=kernel%2Fpid.c;h=b914392085f9a171f08a3e202dc14145e1563929;hb=2920349d438ec08d2b1f6761c8b78b8d13fd1dee;hp=e4779bbb205846f9cdf72c86e72d498d308f563f;hpb=f40f50d3bb33b52dfd550ca80be7daaddad21883;p=safe%2Fjmp%2Flinux-2.6 diff --git a/kernel/pid.c b/kernel/pid.c index e4779bb..b914392 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) EXPORT_SYMBOL(find_task_by_pid_type); +struct pid *get_task_pid(struct task_struct *task, enum pid_type type) +{ + struct pid *pid; + rcu_read_lock(); + pid = get_pid(task->pids[type].pid); + rcu_read_unlock(); + return pid; +} + struct task_struct *fastcall get_pid_task(struct pid *pid, enum pid_type type) { struct task_struct *result;