aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2005-01-07 21:47:19 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 21:47:19 -0800
commit74f5ef85c9c8c2f4a956f85b0b28242ef3cae474 (patch)
tree8379b27ca868fee4a6ff76b00f52242c44a90c9f /fs
parent5c73274566f2e9dab8f5844c6560067dfb0c3611 (diff)
downloadhistory-74f5ef85c9c8c2f4a956f85b0b28242ef3cae474.tar.gz
[PATCH] don't hide thread_group_leader() from grep
Replace open-coded thread_group_leader() calls. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_elf.c2
-rw-r--r--fs/exec.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 4f7e1203b037a5..0ecc44fb05513e 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -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
diff --git a/fs/exec.c b/fs/exec.c
index d201715796bf5b..0bf4d2af69df8f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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 @@ no_thread_group:
if (!thread_group_empty(current))
BUG();
- if (current->tgid != current->pid)
+ if (!thread_group_leader(current))
BUG();
return 0;
}