diff options
author | NeilBrown <neilb@suse.com> | 2018-12-03 11:30:30 +1100 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-12-19 13:52:45 -0500 |
commit | 8276c902bbe95d628f48a7fdc13c71e265992085 (patch) | |
tree | c87b84c351288acff7f391b6e03fcd75a9c33c8f /fs/nfs/flexfilelayout | |
parent | fc0664fd9bccafb00bd2dfe0d5218147994f81ee (diff) | |
download | linux-8276c902bbe95d628f48a7fdc13c71e265992085.tar.bz2 |
SUNRPC: remove uid and gid from struct auth_cred
Use cred->fsuid and cred->fsgid instead.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/flexfilelayout')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index c6e64ce5ca42..1d1c5d127928 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -414,6 +414,8 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, struct auth_cred acred = {}; struct rpc_cred __rcu *cred; struct cred *kcred; + kuid_t uid; + kgid_t gid; u32 ds_count, fh_count, id; int j; @@ -481,14 +483,14 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, if (rc) goto out_err_free; - acred.uid = make_kuid(&init_user_ns, id); + uid = make_kuid(&init_user_ns, id); /* group */ rc = decode_name(&stream, &id); if (rc) goto out_err_free; - acred.gid = make_kgid(&init_user_ns, id); + gid = make_kgid(&init_user_ns, id); if (gfp_flags & __GFP_FS) kcred = prepare_kernel_cred(NULL); @@ -500,8 +502,8 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, rc = -ENOMEM; if (!kcred) goto out_err_free; - kcred->fsuid = acred.uid; - kcred->fsgid = acred.gid; + kcred->fsuid = uid; + kcred->fsgid = gid; acred.cred = kcred; /* find the cred for it */ @@ -533,8 +535,8 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, dprintk("%s: iomode %s uid %u gid %u\n", __func__, lgr->range.iomode == IOMODE_READ ? "READ" : "RW", - from_kuid(&init_user_ns, acred.uid), - from_kgid(&init_user_ns, acred.gid)); + from_kuid(&init_user_ns, uid), + from_kgid(&init_user_ns, gid)); } p = xdr_inline_decode(&stream, 4); |