]> err.no Git - linux-2.6/blobdiff - kernel/pid.c
[PATCH] lkdtm: cleanup headers and module_param/MODULE_PARM_DESC
[linux-2.6] / kernel / pid.c
index e4779bbb205846f9cdf72c86e72d498d308f563f..b914392085f9a171f08a3e202dc14145e1563929 100644 (file)
@@ -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;