diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 5 | ||||
-rw-r--r-- | include/linux/sched/signal.h | 5 | ||||
-rw-r--r-- | include/net/scm.h | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 87bf02d93a27..a461ff89a3af 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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, diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index d8ef0a3d2e7e..b95a272c1ab5 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -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; diff --git a/include/net/scm.h b/include/net/scm.h index 903771c8d4e3..1ce365f4c256 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -8,6 +8,7 @@ #include <linux/security.h> #include <linux/pid.h> #include <linux/nsproxy.h> +#include <linux/sched/signal.h> /* Well, we should have at least one descriptor open * to accept passed FDs 8) |