diff --git a/[refs] b/[refs] index 2aac6580edab..0ab661bc8c21 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5c01ba49e6647d86bc7576105f82027200d1f303 +refs/heads/master: 989264f4645c183331a1279d513f4b1ddc06e1f5 diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 3fb9a77863d5..650c1d1a55d0 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -1101,17 +1101,15 @@ struct wait_opts { int notask_error; }; -static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) +static inline +struct pid *task_pid_type(struct task_struct *task, enum pid_type type) { - struct pid *pid = NULL; - if (type == PIDTYPE_PID) - pid = task->pids[type].pid; - else if (type < PIDTYPE_MAX) - pid = task->group_leader->pids[type].pid; - return pid; + if (type != PIDTYPE_PID) + task = task->group_leader; + return task->pids[type].pid; } -static inline int eligible_pid(struct wait_opts *wo, struct task_struct *p) +static int eligible_pid(struct wait_opts *wo, struct task_struct *p) { return wo->wo_type == PIDTYPE_MAX || task_pid_type(p, wo->wo_type) == wo->wo_pid;