summaryrefslogtreecommitdiffstats
path: root/fs/nfs/flexfilelayout/flexfilelayout.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-28 16:44:15 +0100
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-03-02 04:37:38 +0100
commit626d48b12cde3ae9740e1da16fc9c1d6d7bbed14 (patch)
tree93e99d50e40c4982dbbeb7383ca5b7c8a00bd006 /fs/nfs/flexfilelayout/flexfilelayout.h
parentNFS/flexfiles: Simplify ff_layout_get_ds_cred() (diff)
downloadlinux-626d48b12cde3ae9740e1da16fc9c1d6d7bbed14.tar.xz
linux-626d48b12cde3ae9740e1da16fc9c1d6d7bbed14.zip
NFS/flexfile: Simplify nfs4_ff_layout_ds_version()
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/flexfilelayout.h')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.h b/fs/nfs/flexfilelayout/flexfilelayout.h
index e0b2c3deae5a..99cfe2e8f32a 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.h
+++ b/fs/nfs/flexfilelayout/flexfilelayout.h
@@ -181,9 +181,9 @@ ff_layout_no_read_on_rw(struct pnfs_layout_segment *lseg)
}
static inline int
-nfs4_ff_layout_ds_version(struct pnfs_layout_segment *lseg, u32 ds_idx)
+nfs4_ff_layout_ds_version(const struct nfs4_ff_layout_mirror *mirror)
{
- return FF_LAYOUT_COMP(lseg, ds_idx)->mirror_ds->ds_versions[0].version;
+ return mirror->mirror_ds->ds_versions[0].version;
}
struct nfs4_ff_layout_ds *