Skip to content

Commit

Permalink
NFS/pNFS: Fix a typo in ff_layout_resend_pnfs_read()
Browse files Browse the repository at this point in the history
[ Upstream commit 52104f2 ]

Don't bump the index twice.

Fixes: 563c53e ("NFS: Fix flexfiles read failover")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Trond Myklebust authored and gregkh committed Dec 30, 2020
1 parent 1b75aea commit de16a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/flexfilelayout/flexfilelayout.c
Expand Up @@ -1056,7 +1056,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);
Expand Down

0 comments on commit de16a86

Please sign in to comment.