Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pids: Move task_pid_type into sched/signal.h

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>

+8 -8
+8
include/linux/sched/signal.h
··· 556 556 typedef int (*proc_visitor)(struct task_struct *p, void *data); 557 557 void walk_process_tree(struct task_struct *top, proc_visitor, void *); 558 558 559 + static inline 560 + struct pid *task_pid_type(struct task_struct *task, enum pid_type type) 561 + { 562 + if (type != PIDTYPE_PID) 563 + task = task->group_leader; 564 + return task->pids[type].pid; 565 + } 566 + 559 567 static inline int get_nr_threads(struct task_struct *tsk) 560 568 { 561 569 return tsk->signal->nr_threads;
-8
kernel/exit.c
··· 1001 1001 int notask_error; 1002 1002 }; 1003 1003 1004 - static inline 1005 - struct pid *task_pid_type(struct task_struct *task, enum pid_type type) 1006 - { 1007 - if (type != PIDTYPE_PID) 1008 - task = task->group_leader; 1009 - return task->pids[type].pid; 1010 - } 1011 - 1012 1004 static int eligible_pid(struct wait_opts *wo, struct task_struct *p) 1013 1005 { 1014 1006 return wo->wo_type == PIDTYPE_MAX ||