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:
@@ -564,6 +564,11 @@ struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
|
||||
return task->pids[type].pid;
|
||||
}
|
||||
|
||||
static inline struct pid *task_tgid(struct task_struct *task)
|
||||
{
|
||||
return task->signal->leader_pid;
|
||||
}
|
||||
|
||||
static inline int get_nr_threads(struct task_struct *tsk)
|
||||
{
|
||||
return tsk->signal->nr_threads;
|
||||
|
||||
Reference in New Issue
Block a user