pids: Compute task_tgid using signal->leader_pid
The cost is the the same and this removes the need to worry about complications that come from de_thread and group_leader changing. __task_pid_nr_ns has been updated to take advantage of this change. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
@@ -1202,11 +1202,6 @@ static inline struct pid *task_pid(struct task_struct *task)
|
||||
return task->pids[PIDTYPE_PID].pid;
|
||||
}
|
||||
|
||||
static inline struct pid *task_tgid(struct task_struct *task)
|
||||
{
|
||||
return task->group_leader->pids[PIDTYPE_PID].pid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Without tasklist or RCU lock it is not safe to dereference
|
||||
* the result of task_pgrp/task_session even if task == current,
|
||||
|
Reference in New Issue
Block a user