staging: lustre: remove typedef for group_info_t
Use "struct group_info" like the rest of the kernel, not a typedef. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c34d9cd855
commit
c88a6cbb77
6 changed files with 9 additions and 35 deletions
|
@ -168,32 +168,7 @@ do { \
|
||||||
/*
|
/*
|
||||||
* atomic
|
* atomic
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define cfs_atomic_add_unless(atom, a, u) atomic_add_unless(atom, a, u)
|
#define cfs_atomic_add_unless(atom, a, u) atomic_add_unless(atom, a, u)
|
||||||
#define cfs_atomic_cmpxchg(atom, old, nv) atomic_cmpxchg(atom, old, nv)
|
#define cfs_atomic_cmpxchg(atom, old, nv) atomic_cmpxchg(atom, old, nv)
|
||||||
|
|
||||||
/*
|
|
||||||
* membar
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* interrupt
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* might_sleep
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* group_info
|
|
||||||
*/
|
|
||||||
typedef struct group_info group_info_t;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Random bytes
|
|
||||||
*/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct md_identity {
|
||||||
struct upcall_cache_entry *mi_uc_entry;
|
struct upcall_cache_entry *mi_uc_entry;
|
||||||
uid_t mi_uid;
|
uid_t mi_uid;
|
||||||
gid_t mi_gid;
|
gid_t mi_gid;
|
||||||
group_info_t *mi_ginfo;
|
struct group_info *mi_ginfo;
|
||||||
int mi_nperms;
|
int mi_nperms;
|
||||||
struct md_perm *mi_perms;
|
struct md_perm *mi_perms;
|
||||||
};
|
};
|
||||||
|
|
|
@ -80,8 +80,8 @@ struct lustre_idmap_table {
|
||||||
|
|
||||||
struct lu_ucred;
|
struct lu_ucred;
|
||||||
|
|
||||||
extern void lustre_groups_from_list(group_info_t *ginfo, gid_t *glist);
|
extern void lustre_groups_from_list(struct group_info *ginfo, gid_t *glist);
|
||||||
extern void lustre_groups_sort(group_info_t *group_info);
|
extern void lustre_groups_sort(struct group_info *group_info);
|
||||||
extern int lustre_in_group_p(struct lu_ucred *mu, gid_t grp);
|
extern int lustre_in_group_p(struct lu_ucred *mu, gid_t grp);
|
||||||
|
|
||||||
extern int lustre_idmap_add(struct lustre_idmap_table *t,
|
extern int lustre_idmap_add(struct lustre_idmap_table *t,
|
||||||
|
|
|
@ -871,7 +871,7 @@ struct lu_ucred {
|
||||||
__u32 uc_suppgids[2];
|
__u32 uc_suppgids[2];
|
||||||
cfs_cap_t uc_cap;
|
cfs_cap_t uc_cap;
|
||||||
__u32 uc_umask;
|
__u32 uc_umask;
|
||||||
group_info_t *uc_ginfo;
|
struct group_info *uc_ginfo;
|
||||||
struct md_identity *uc_identity;
|
struct md_identity *uc_identity;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,7 @@
|
||||||
* groups_search() is copied from linux kernel!
|
* groups_search() is copied from linux kernel!
|
||||||
* A simple bsearch.
|
* A simple bsearch.
|
||||||
*/
|
*/
|
||||||
static int lustre_groups_search(group_info_t *group_info,
|
static int lustre_groups_search(const struct group_info *group_info, gid_t grp)
|
||||||
gid_t grp)
|
|
||||||
{
|
{
|
||||||
int left, right;
|
int left, right;
|
||||||
|
|
||||||
|
@ -84,7 +83,7 @@ static int lustre_groups_search(group_info_t *group_info,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lustre_groups_from_list(group_info_t *ginfo, gid_t *glist)
|
void lustre_groups_from_list(struct group_info *ginfo, gid_t *glist)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int count = ginfo->ngroups;
|
int count = ginfo->ngroups;
|
||||||
|
@ -103,7 +102,7 @@ EXPORT_SYMBOL(lustre_groups_from_list);
|
||||||
|
|
||||||
/* groups_sort() is copied from linux kernel! */
|
/* groups_sort() is copied from linux kernel! */
|
||||||
/* a simple shell-metzner sort */
|
/* a simple shell-metzner sort */
|
||||||
void lustre_groups_sort(group_info_t *group_info)
|
void lustre_groups_sort(struct group_info *group_info)
|
||||||
{
|
{
|
||||||
int base, max, stride;
|
int base, max, stride;
|
||||||
int gidsetsize = group_info->ngroups;
|
int gidsetsize = group_info->ngroups;
|
||||||
|
@ -141,7 +140,7 @@ int lustre_in_group_p(struct lu_ucred *mu, gid_t grp)
|
||||||
int rc = 1;
|
int rc = 1;
|
||||||
|
|
||||||
if (grp != mu->uc_fsgid) {
|
if (grp != mu->uc_fsgid) {
|
||||||
group_info_t *group_info = NULL;
|
struct group_info *group_info = NULL;
|
||||||
|
|
||||||
if (mu->uc_ginfo || !mu->uc_identity ||
|
if (mu->uc_ginfo || !mu->uc_identity ||
|
||||||
mu->uc_valid == UCRED_OLD)
|
mu->uc_valid == UCRED_OLD)
|
||||||
|
|
|
@ -2266,7 +2266,7 @@ static int ptlrpc_main(void *arg)
|
||||||
struct ptlrpc_service *svc = svcpt->scp_service;
|
struct ptlrpc_service *svc = svcpt->scp_service;
|
||||||
struct ptlrpc_reply_state *rs;
|
struct ptlrpc_reply_state *rs;
|
||||||
#ifdef WITH_GROUP_INFO
|
#ifdef WITH_GROUP_INFO
|
||||||
group_info_t *ginfo = NULL;
|
struct group_info *ginfo = NULL;
|
||||||
#endif
|
#endif
|
||||||
struct lu_env *env;
|
struct lu_env *env;
|
||||||
int counter = 0, rc = 0;
|
int counter = 0, rc = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue