summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-12-16 23:17:45 +0100
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-12-16 23:25:24 +0100
commit52104f274e2d7f134d34bab11cada8913d4544e2 (patch)
tree30e084b0de67b487a615739837e1bf67a58ec74d /fs/nfs
parentpNFS/flexfiles: Avoid spurious layout returns in ff_layout_choose_ds_for_read (diff)
downloadlinux-52104f274e2d7f134d34bab11cada8913d4544e2.tar.xz
linux-52104f274e2d7f134d34bab11cada8913d4544e2.zip
NFS/pNFS: Fix a typo in ff_layout_resend_pnfs_read()
Don't bump the index twice. Fixes: 563c53e73b8b ("NFS: Fix flexfiles read failover") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 439169301d56..43ed743d10ea 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1052,7 +1052,7 @@ static void ff_layout_resend_pnfs_read(struct nfs_pgio_header *hdr)
u32 idx = hdr->pgio_mirror_idx + 1;
u32 new_idx = 0;
- if (ff_layout_choose_any_ds_for_read(hdr->lseg, idx + 1, &new_idx))
+ if (ff_layout_choose_any_ds_for_read(hdr->lseg, idx, &new_idx))
ff_layout_send_layouterror(hdr->lseg);
else
pnfs_error_mark_layout_for_return(hdr->inode, hdr->lseg);