diff options
| author | 2019-02-28 10:38:41 -0500 | |
|---|---|---|
| committer | 2019-03-01 22:37:38 -0500 | |
| commit | 561d6f8aaffcc9d346e452361a6d80cb8461799d (patch) | |
| tree | b4c2cb0af15b5957a96b11f829ca7bfc7701402e /fs/nfs/flexfilelayout/flexfilelayoutdev.c | |
| parent | NFS/flexfiles: Simplify nfs4_ff_layout_select_ds_fh() (diff) | |
| download | linux-dev-561d6f8aaffcc9d346e452361a6d80cb8461799d.tar.xz linux-dev-561d6f8aaffcc9d346e452361a6d80cb8461799d.zip | |
NFS/flexfiles: Simplify nfs4_ff_find_or_create_ds_client()
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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index 3a2419313fe9..1fe66745f452 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -464,8 +464,7 @@ ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx, /** * nfs4_ff_find_or_create_ds_client - Find or create a DS rpc client - * @lseg: pointer to layout segment - * @ds_idx: mirror index + * @mirror: pointer to the mirror * @ds_clp: nfs_client for the DS * @inode: pointer to inode * @@ -473,11 +472,9 @@ ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx, * in the nfs_client cl_ds_clients list. */ struct rpc_clnt * -nfs4_ff_find_or_create_ds_client(struct pnfs_layout_segment *lseg, u32 ds_idx, +nfs4_ff_find_or_create_ds_client(struct nfs4_ff_layout_mirror *mirror, struct nfs_client *ds_clp, struct inode *inode) { - struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx); - switch (mirror->mirror_ds->ds_versions[0].version) { case 3: /* For NFSv3 DS, flavor is set when creating DS connections */ |
