cred: simpler, 1D supplementary groups
[cascardo/linux.git] / include / linux / cred.h
index 257db64..f0e70a1 100644 (file)
@@ -26,15 +26,10 @@ struct inode;
 /*
  * COW Supplementary groups list
  */
 /*
  * COW Supplementary groups list
  */
-#define NGROUPS_SMALL          32
-#define NGROUPS_PER_BLOCK      ((unsigned int)(PAGE_SIZE / sizeof(kgid_t)))
-
 struct group_info {
        atomic_t        usage;
        int             ngroups;
 struct group_info {
        atomic_t        usage;
        int             ngroups;
-       int             nblocks;
-       kgid_t          small_block[NGROUPS_SMALL];
-       kgid_t          *blocks[0];
+       kgid_t          gid[0];
 };
 
 /**
 };
 
 /**
@@ -88,10 +83,6 @@ extern void set_groups(struct cred *, struct group_info *);
 extern int groups_search(const struct group_info *, kgid_t);
 extern bool may_setgroups(void);
 
 extern int groups_search(const struct group_info *, kgid_t);
 extern bool may_setgroups(void);
 
-/* access the groups "array" with this macro */
-#define GROUP_AT(gi, i) \
-       ((gi)->blocks[(i) / NGROUPS_PER_BLOCK][(i) % NGROUPS_PER_BLOCK])
-
 /*
  * The security context of a task
  *
 /*
  * The security context of a task
  *