[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>
This commit is contained in:
Cedric Le Goater
2006-12-08 02:37:54 -08:00
committed by Linus Torvalds
parent ef55d53caa
commit 937949d9ed
11 changed files with 35 additions and 29 deletions

View File

@@ -1047,6 +1047,11 @@ static inline pid_t process_group(struct task_struct *tsk)
return tsk->signal->pgrp;
}
static inline pid_t process_session(struct task_struct *tsk)
{
return tsk->signal->session;
}
static inline struct pid *task_pid(struct task_struct *task)
{
return task->pids[PIDTYPE_PID].pid;