aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/flexfilelayout/flexfilelayoutdev.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-28 10:41:57 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-03-01 22:37:38 -0500
commit312cd4cb126a7936ad25306d14209fa6fd00f30a (patch)
tree59214d097db2ebd5a3ac68dfcb6de730b40bf5ff /fs/nfs/flexfilelayout/flexfilelayoutdev.c
parentNFS/flexfiles: Simplify nfs4_ff_find_or_create_ds_client() (diff)
downloadlinux-dev-312cd4cb126a7936ad25306d14209fa6fd00f30a.tar.xz
linux-dev-312cd4cb126a7936ad25306d14209fa6fd00f30a.zip
NFS/flexfiles: Simplify ff_layout_get_ds_cred()
Pass in a pointer to the mirror rather than forcing another array access. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayoutdev.c')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index 1fe66745f452..1673935074cc 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -446,14 +446,14 @@ out:
}
const struct cred *
-ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx,
+ff_layout_get_ds_cred(struct nfs4_ff_layout_mirror *mirror,
+ const struct pnfs_layout_range *range,
const struct cred *mdscred)
{
- struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
const struct cred *cred;
if (mirror && !mirror->mirror_ds->ds_versions[0].tightly_coupled) {
- cred = ff_layout_get_mirror_cred(mirror, lseg->pls_range.iomode);
+ cred = ff_layout_get_mirror_cred(mirror, range->iomode);
if (!cred)
cred = get_cred(mdscred);
} else {