[Devel] [RFC][PATCH 08/14] Remove unused nr field from struct pid
    sukadev at us.ibm.com 
    sukadev at us.ibm.com
       
    Tue Mar 20 20:20:47 PDT 2007
    
    
  
From: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Subject: [RFC][PATCH 08/14] Remove unused nr field from struct pid
A process can have several pid_t values and these values are
represented by the pid->pid_nrs list. We no longer need the
'nr' field in struct pid.
Signed-off-by: Sukadev Bhattiprolu <sukadev at us.ibm.com>
---
 include/linux/init_task.h |    1 -
 include/linux/pid.h       |    1 -
 kernel/pid.c              |    1 -
 3 files changed, 3 deletions(-)
Index: 2.6.21-rc3-mm2/include/linux/pid.h
===================================================================
--- 2.6.21-rc3-mm2.orig/include/linux/pid.h
+++ 2.6.21-rc3-mm2/include/linux/pid.h
@@ -62,7 +62,6 @@ struct pid_nr
 struct pid
 {
 	atomic_t count;
-	int nr;
 	/* lists of tasks that use this pid */
 	struct hlist_head tasks[PIDTYPE_MAX];
 	struct rcu_head rcu;
Index: 2.6.21-rc3-mm2/include/linux/init_task.h
===================================================================
--- 2.6.21-rc3-mm2.orig/include/linux/init_task.h
+++ 2.6.21-rc3-mm2/include/linux/init_task.h
@@ -107,7 +107,6 @@ extern struct group_info init_groups;
 #define INIT_STRUCT_PID {						\
 	.count 		= ATOMIC_INIT(1),				\
-	.nr		= 0, 						\
 	.tasks		= {						\
 		{ .first = &init_task.pids[PIDTYPE_PID].node },		\
 		{ .first = &init_task.pids[PIDTYPE_PGID].node },	\
Index: 2.6.21-rc3-mm2/kernel/pid.c
===================================================================
--- 2.6.21-rc3-mm2.orig/kernel/pid.c
+++ 2.6.21-rc3-mm2/kernel/pid.c
@@ -291,7 +291,6 @@ struct pid *alloc_pid(void)
 	if (!pid_nr)
 		goto out_free_pid;
-	pid->nr = pid_nr->nr; 		/* pid->nr to be removed soon */
 	hlist_add_head(&pid_nr->node, &pid->pid_nrs);
 	return pid;
-- 
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
    
    
More information about the Devel
mailing list