diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2006-12-08 05:37:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:51 -0500 |
commit | 937949d9edbf4049bd41af6c9f92c26280584564 (patch) | |
tree | d0a28f503b082f890cfa1f7fe952fda8fc771752 /fs | |
parent | ef55d53caa055aedee13e77da82740987dd64f2d (diff) |
[PATCH] add process_session() helper routine
Replace occurences of task->signal->session by a new process_session() helper
routine.
It will be useful for pid namespaces to abstract the session pid number.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
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.c | 4 | ||||
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index c6dbb4a7ec7..d3adfd353ff 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1317,7 +1317,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus, | |||
1317 | prstatus->pr_pid = p->pid; | 1317 | prstatus->pr_pid = p->pid; |
1318 | prstatus->pr_ppid = p->parent->pid; | 1318 | prstatus->pr_ppid = p->parent->pid; |
1319 | prstatus->pr_pgrp = process_group(p); | 1319 | prstatus->pr_pgrp = process_group(p); |
1320 | prstatus->pr_sid = p->signal->session; | 1320 | prstatus->pr_sid = process_session(p); |
1321 | if (thread_group_leader(p)) { | 1321 | if (thread_group_leader(p)) { |
1322 | /* | 1322 | /* |
1323 | * This is the record for the group leader. Add in the | 1323 | * This is the record for the group leader. Add in the |
@@ -1363,7 +1363,7 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, | |||
1363 | psinfo->pr_pid = p->pid; | 1363 | psinfo->pr_pid = p->pid; |
1364 | psinfo->pr_ppid = p->parent->pid; | 1364 | psinfo->pr_ppid = p->parent->pid; |
1365 | psinfo->pr_pgrp = process_group(p); | 1365 | psinfo->pr_pgrp = process_group(p); |
1366 | psinfo->pr_sid = p->signal->session; | 1366 | psinfo->pr_sid = process_session(p); |
1367 | 1367 | ||
1368 | i = p->state ? ffz(~p->state) + 1 : 0; | 1368 | i = p->state ? ffz(~p->state) + 1 : 0; |
1369 | psinfo->pr_state = i; | 1369 | psinfo->pr_state = i; |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 9f0b7efc3df..76f06f6bc2f 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1322,7 +1322,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus, | |||
1322 | prstatus->pr_pid = p->pid; | 1322 | prstatus->pr_pid = p->pid; |
1323 | prstatus->pr_ppid = p->parent->pid; | 1323 | prstatus->pr_ppid = p->parent->pid; |
1324 | prstatus->pr_pgrp = process_group(p); | 1324 | prstatus->pr_pgrp = process_group(p); |
1325 | prstatus->pr_sid = p->signal->session; | 1325 | prstatus->pr_sid = process_session(p); |
1326 | if (thread_group_leader(p)) { | 1326 | if (thread_group_leader(p)) { |
1327 | /* | 1327 | /* |
1328 | * This is the record for the group leader. Add in the | 1328 | * This is the record for the group leader. Add in the |
@@ -1371,7 +1371,7 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, | |||
1371 | psinfo->pr_pid = p->pid; | 1371 | psinfo->pr_pid = p->pid; |
1372 | psinfo->pr_ppid = p->parent->pid; | 1372 | psinfo->pr_ppid = p->parent->pid; |
1373 | psinfo->pr_pgrp = process_group(p); | 1373 | psinfo->pr_pgrp = process_group(p); |
1374 | psinfo->pr_sid = p->signal->session; | 1374 | psinfo->pr_sid = process_session(p); |
1375 | 1375 | ||
1376 | i = p->state ? ffz(~p->state) + 1 : 0; | 1376 | i = p->state ? ffz(~p->state) + 1 : 0; |
1377 | psinfo->pr_state = i; | 1377 | psinfo->pr_state = i; |