]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
pids: Move task_pid_type into sched/signal.h
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 5 May 2017 18:45:14 +0000 (13:45 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 21 Jul 2018 15:43:12 +0000 (10:43 -0500)
The function is general and inline so there is no need
to hide it inside of exit.c

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
include/linux/sched/signal.h
kernel/exit.c

index 113d1ad1ced76e0c138c9dd05d1420ff28c71616..d8ef0a3d2e7e1525b0e8416ed33546d70104152f 100644 (file)
@@ -556,6 +556,14 @@ extern bool current_is_single_threaded(void);
 typedef int (*proc_visitor)(struct task_struct *p, void *data);
 void walk_process_tree(struct task_struct *top, proc_visitor, void *);
 
+static inline
+struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
+{
+       if (type != PIDTYPE_PID)
+               task = task->group_leader;
+       return task->pids[type].pid;
+}
+
 static inline int get_nr_threads(struct task_struct *tsk)
 {
        return tsk->signal->nr_threads;
index c3c7ac5601140961563534441908b52ced5a557c..16432428fc6c5c004add4fab6fc89e4c3a485f0a 100644 (file)
@@ -1001,14 +1001,6 @@ struct wait_opts {
        int                     notask_error;
 };
 
-static inline
-struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
-{
-       if (type != PIDTYPE_PID)
-               task = task->group_leader;
-       return task->pids[type].pid;
-}
-
 static int eligible_pid(struct wait_opts *wo, struct task_struct *p)
 {
        return  wo->wo_type == PIDTYPE_MAX ||