osi_Panic("crget: No more memory for creds!\n");
for (i = 0; i < CRED_ALLOC_STEP - 1; i++)
- cred_pool[i].cr_ref = (long)&cred_pool[i + 1];
- cred_pool[i].cr_ref = 0;
+ cred_pool[i].cr_next = (cred_t *) &cred_pool[i + 1];
+ cred_pool[i].cr_next = NULL;
}
tmp = cred_pool;
- cred_pool = (cred_t *) tmp->cr_ref;
+ cred_pool = (cred_t *) tmp->cr_next;
ncreds_inuse++;
CRED_UNLOCK();
crfree(cred_t * cr)
{
if (cr->cr_ref > 1) {
-#if defined(AFS_LINUX26_ENV)
- put_group_info(cr->cr_group_info);
-#endif
cr->cr_ref--;
return;
}
+#if defined(AFS_LINUX26_ENV)
+ put_group_info(cr->cr_group_info);
+#endif
CRED_LOCK();
- cr->cr_ref = (long)cred_pool;
+ cr->cr_next = (cred_t *) cred_pool;
cred_pool = cr;
CRED_UNLOCK();
ncreds_inuse--;
/* cred struct */
typedef struct cred { /* maps to task field: */
-#if (CPU == sparc64)
- long cr_ref;
-#else
int cr_ref;
-#endif
uid_t cr_uid; /* euid */
uid_t cr_ruid; /* uid */
gid_t cr_gid; /* egid */
gid_t cr_groups[NGROUPS]; /* 32 groups - empty set to NOGROUP */
int cr_ngroups;
#endif
+ struct cred *cr_next;
} cred_t;
#define AFS_UCRED cred
#define AFS_PROC struct task_struct