NFS/flexfile: Simplify nfs4_ff_layout_select_ds_stateid()
Pass in a pointer to the mirror rather than forcing another array access. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@@ -1799,9 +1799,7 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr)
|
||||
if (fh)
|
||||
hdr->args.fh = fh;
|
||||
|
||||
if (vers == 4 &&
|
||||
!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid))
|
||||
goto out_failed;
|
||||
nfs4_ff_layout_select_ds_stateid(mirror, &hdr->args.stateid);
|
||||
|
||||
/*
|
||||
* Note that if we ever decide to split across DSes,
|
||||
@@ -1867,9 +1865,7 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
|
||||
if (fh)
|
||||
hdr->args.fh = fh;
|
||||
|
||||
if (vers == 4 &&
|
||||
!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid))
|
||||
goto out_failed;
|
||||
nfs4_ff_layout_select_ds_stateid(mirror, &hdr->args.stateid);
|
||||
|
||||
/*
|
||||
* Note that if we ever decide to split across DSes,
|
||||
|
Reference in New Issue
Block a user