Commit 74f5ef85 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] don't hide thread_group_leader() from grep

Replace open-coded thread_group_leader() calls.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5c732745
......@@ -1204,7 +1204,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
prstatus->pr_ppid = p->parent->pid;
prstatus->pr_pgrp = process_group(p);
prstatus->pr_sid = p->signal->session;
if (p->pid == p->tgid) {
if (thread_group_leader(p)) {
/*
* This is the record for the group leader. Add in the
* cumulative times of previous dead threads. This total
......
......@@ -618,7 +618,7 @@ static inline int de_thread(struct task_struct *tsk)
* Account for the thread group leader hanging around:
*/
count = 2;
if (current->pid == current->tgid)
if (thread_group_leader(current))
count = 1;
while (atomic_read(&sig->count) > count) {
sig->group_exit_task = current;
......@@ -637,7 +637,7 @@ static inline int de_thread(struct task_struct *tsk)
* do is to wait for the thread group leader to become inactive,
* and to assume its PID:
*/
if (current->pid != current->tgid) {
if (!thread_group_leader(current)) {
struct task_struct *leader = current->group_leader, *parent;
struct dentry *proc_dentry1, *proc_dentry2;
unsigned long exit_state, ptrace;
......@@ -747,7 +747,7 @@ static inline int de_thread(struct task_struct *tsk)
if (!thread_group_empty(current))
BUG();
if (current->tgid != current->pid)
if (!thread_group_leader(current))
BUG();
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment