summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-02-18 04:49:05 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-02-18 04:49:05 -0800
commita937b06ed59067eb1cc93390b8f13bbfab229458 (patch)
tree146aa92588c4bd40899cc161d4d18919405f7f66 /fs/proc/array.c
parent7e594425ebac8ca16c7fc787e4ee76801a653d46 (diff)
[PATCH] NGROUPS 2.6.2rc2 + fixups
From: Tim Hockin <thockin@sun.com>, Neil Brown <neilb@cse.unsw.edu.au>, me New groups infrastructure. task->groups and task->ngroups are replaced by task->group_info. Group)info is a refcounted, dynamic struct with an array of pages. This allows for large numbers of groups. The current limit of 32 groups has been raised to 64k groups. It can be raised more by changing the NGROUPS_MAX constant in limits.h
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index d26f6590bd05..7af62577287e 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -176,8 +176,10 @@ static inline char * task_state(struct task_struct *p, char *buffer)
p->files ? p->files->max_fds : 0);
task_unlock(p);
- for (g = 0; g < p->ngroups; g++)
- buffer += sprintf(buffer, "%d ", p->groups[g]);
+ get_group_info(p->group_info);
+ for (g = 0; g < min(p->group_info->ngroups,NGROUPS_SMALL); g++)
+ buffer += sprintf(buffer, "%d ", GROUP_AT(p->group_info,g));
+ put_group_info(p->group_info);
buffer += sprintf(buffer, "\n");
return buffer;