[Devel] [PATCH 4/4] Use task_pgrp() in autofs/autofs4

sukadev at us.ibm.com sukadev at us.ibm.com
Thu Feb 22 15:33:23 PST 2007


From: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Subject: [PATCH 4/4] Use task_pgrp() in autofs/autofs4

Replace process_group(tsk) with pid_nr(task_pgrp(tsk)) in autofs and autofs4.

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

---
 fs/autofs/inode.c  |    2 +-
 fs/autofs/root.c   |    4 ++--
 fs/autofs4/inode.c |    2 +-
 fs/autofs4/root.c  |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

Index: lx26-20-mm1/fs/autofs/root.c
===================================================================
--- lx26-20-mm1.orig/fs/autofs/root.c	2007-02-16 15:44:24.000000000 -0800
+++ lx26-20-mm1/fs/autofs/root.c	2007-02-16 15:45:17.000000000 -0800
@@ -215,7 +215,7 @@ static struct dentry *autofs_root_lookup
 	oz_mode = autofs_oz_mode(sbi);
 	DPRINTK(("autofs_lookup: pid = %u, pgrp = %u, catatonic = %d, "
 				"oz_mode = %d\n", pid_nr(task_pid(current)),
-				process_group(current), sbi->catatonic,
+				pid_nr(task_pgrp(current)), sbi->catatonic,
 				oz_mode));
 
 	/*
@@ -536,7 +536,7 @@ static int autofs_root_ioctl(struct inod
 	struct autofs_sb_info *sbi = autofs_sbi(inode->i_sb);
 	void __user *argp = (void __user *)arg;
 
-	DPRINTK(("autofs_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n",cmd,arg,sbi,process_group(current)));
+	DPRINTK(("autofs_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n",cmd,arg,sbi,pid_nr(task_pgrp(current))));
 
 	if (_IOC_TYPE(cmd) != _IOC_TYPE(AUTOFS_IOC_FIRST) ||
 	     _IOC_NR(cmd) - _IOC_NR(AUTOFS_IOC_FIRST) >= AUTOFS_IOC_COUNT)
Index: lx26-20-mm1/fs/autofs4/root.c
===================================================================
--- lx26-20-mm1.orig/fs/autofs4/root.c	2007-02-16 15:44:30.000000000 -0800
+++ lx26-20-mm1/fs/autofs4/root.c	2007-02-16 15:45:17.000000000 -0800
@@ -583,7 +583,7 @@ static struct dentry *autofs4_lookup(str
 	oz_mode = autofs4_oz_mode(sbi);
 
 	DPRINTK("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d",
-		 pid_nr(task_pid(current)), process_group(current),
+		 pid_nr(task_pid(current)), pid_nr(task_pgrp(current)),
 		 sbi->catatonic, oz_mode);
 
 	unhashed = autofs4_lookup_unhashed(sbi, dentry->d_parent, &dentry->d_name);
@@ -975,7 +975,7 @@ static int autofs4_root_ioctl(struct ino
 	void __user *p = (void __user *)arg;
 
 	DPRINTK("cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u",
-		cmd,arg,sbi,process_group(current));
+		cmd,arg,sbi,pid_nr(task_pgrp(current)));
 
 	if (_IOC_TYPE(cmd) != _IOC_TYPE(AUTOFS_IOC_FIRST) ||
 	     _IOC_NR(cmd) - _IOC_NR(AUTOFS_IOC_FIRST) >= AUTOFS_IOC_COUNT)
Index: lx26-20-mm1/fs/autofs/inode.c
===================================================================
--- lx26-20-mm1.orig/fs/autofs/inode.c	2007-02-16 15:44:24.000000000 -0800
+++ lx26-20-mm1/fs/autofs/inode.c	2007-02-16 15:45:17.000000000 -0800
@@ -80,7 +80,7 @@ static int parse_options(char *options, 
 
 	*uid = current->uid;
 	*gid = current->gid;
-	*pgrp = process_group(current);
+	*pgrp = pid_nr(task_pgrp(current));
 
 	*minproto = *maxproto = AUTOFS_PROTO_VERSION;
 
Index: lx26-20-mm1/fs/autofs4/inode.c
===================================================================
--- lx26-20-mm1.orig/fs/autofs4/inode.c	2007-02-16 15:44:30.000000000 -0800
+++ lx26-20-mm1/fs/autofs4/inode.c	2007-02-16 15:45:17.000000000 -0800
@@ -229,7 +229,7 @@ static int parse_options(char *options, 
 
 	*uid = current->uid;
 	*gid = current->gid;
-	*pgrp = process_group(current);
+	*pgrp = pid_nr(task_pgrp(current));
 
 	*minproto = AUTOFS_MIN_PROTO_VERSION;
 	*maxproto = AUTOFS_MAX_PROTO_VERSION;
_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers




More information about the Devel mailing list