[PATCH] Use task_pgrp() and task_session() in irix

sukadev at us.ibm.com sukadev at us.ibm.com
Thu Feb 22 15:35:05 PST 2007



From: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Subject: [PATCH] Use task_pgrp() and task_session() in irix

Replace process_group(p) and process_session(p) in IRIX files with 
container friendly interfaces (task_pgrp() and task_session).

Signed-off-by: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Cc: Cedric Le Goater <clg at fr.ibm.com>
Cc: Dave Hansen <haveblue at us.ibm.com>
Cc: Serge Hallyn <serue at us.ibm.com>
Cc: containers at lists.osdl.org
---
 arch/mips/kernel/irixelf.c |    4 ++--
 arch/mips/kernel/irixsig.c |    2 +-
 arch/mips/kernel/sysirix.c |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Index: lx26-20-mm1/arch/mips/kernel/irixelf.c
===================================================================
--- lx26-20-mm1.orig/arch/mips/kernel/irixelf.c	2007-02-16 14:32:36.000000000 -0800
+++ lx26-20-mm1/arch/mips/kernel/irixelf.c	2007-02-16 15:46:49.000000000 -0800
@@ -1171,8 +1171,8 @@ static int irix_core_dump(long signr, st
 	prstatus.pr_sighold = current->blocked.sig[0];
 	psinfo.pr_pid = prstatus.pr_pid = current->pid;
 	psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid;
-	psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current);
-	psinfo.pr_sid = prstatus.pr_sid = process_session(current);
+	psinfo.pr_pgrp = prstatus.pr_pgrp = pid_nr(task_pgrp(current));
+	psinfo.pr_sid = prstatus.pr_sid = pid_nr(task_session(current));
 	if (current->pid == current->tgid) {
 		/*
 		 * This is the record for the group leader.  Add in the
Index: lx26-20-mm1/arch/mips/kernel/irixsig.c
===================================================================
--- lx26-20-mm1.orig/arch/mips/kernel/irixsig.c	2007-02-04 10:44:54.000000000 -0800
+++ lx26-20-mm1/arch/mips/kernel/irixsig.c	2007-02-16 15:46:49.000000000 -0800
@@ -610,7 +610,7 @@ repeat:
 		p = list_entry(_p,struct task_struct,sibling);
 		if ((type == IRIX_P_PID) && p->pid != pid)
 			continue;
-		if ((type == IRIX_P_PGID) && process_group(p) != pid)
+		if ((type == IRIX_P_PGID) && pid_nr(task_pgrp(p)) != pid)
 			continue;
 		if ((p->exit_signal != SIGCHLD))
 			continue;
Index: lx26-20-mm1/arch/mips/kernel/sysirix.c
===================================================================
--- lx26-20-mm1.orig/arch/mips/kernel/sysirix.c	2007-02-16 14:32:36.000000000 -0800
+++ lx26-20-mm1/arch/mips/kernel/sysirix.c	2007-02-20 10:35:50.000000000 -0800
@@ -763,11 +763,11 @@ asmlinkage int irix_setpgrp(int flags)
 	printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags);
 #endif
 	if(!flags)
-		error = process_group(current);
+		error = pid_nr(task_pgrp(current));
 	else
 		error = sys_setsid();
 #ifdef DEBUG_PROCGRPS
-	printk("returning %d\n", process_group(current));
+	printk("returning %d\n", error);
 #endif
 
 	return error;



More information about the Containers mailing list