aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2016-05-17 12:28:43 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-17 15:48:11 -0400
commit094069f1d96f691637b5c335f5eb79566d2457ff (patch)
tree3c2fa9e37e2752489be261e9505adf7e88034e64
parent6d597e1750126a2c6fd99e4b2cc176955bb9972e (diff)
flexfiles: remove pointless setting of NFS_LAYOUT_RETURN_REQUESTED
Setting just the NFS_LAYOUT_RETURN_REQUESTED flag doesn't do anything, unless there are lsegs that are also being marked for return. At the point where that happens this flag is also set, so these set_bit calls don't do anything useful. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c2
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 3bac2094c175..40bccb2c06d1 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1270,8 +1270,6 @@ static int ff_layout_read_done_cb(struct rpc_task *task,
1270 hdr->pgio_mirror_idx + 1, 1270 hdr->pgio_mirror_idx + 1,
1271 &hdr->pgio_mirror_idx)) 1271 &hdr->pgio_mirror_idx))
1272 goto out_eagain; 1272 goto out_eagain;
1273 set_bit(NFS_LAYOUT_RETURN_REQUESTED,
1274 &hdr->lseg->pls_layout->plh_flags);
1275 pnfs_read_resend_pnfs(hdr); 1273 pnfs_read_resend_pnfs(hdr);
1276 return task->tk_status; 1274 return task->tk_status;
1277 case -NFS4ERR_RESET_TO_MDS: 1275 case -NFS4ERR_RESET_TO_MDS:
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index 8242ab327fee..bb598923b2ef 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -394,13 +394,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx,
394 mirror, lseg->pls_range.offset, 394 mirror, lseg->pls_range.offset,
395 lseg->pls_range.length, NFS4ERR_NXIO, 395 lseg->pls_range.length, NFS4ERR_NXIO,
396 OP_ILLEGAL, GFP_NOIO); 396 OP_ILLEGAL, GFP_NOIO);
397 if (!fail_return) { 397 if (fail_return || !ff_layout_has_available_ds(lseg))
398 if (ff_layout_has_available_ds(lseg))
399 set_bit(NFS_LAYOUT_RETURN_REQUESTED,
400 &lseg->pls_layout->plh_flags);
401 else
402 pnfs_error_mark_layout_for_return(ino, lseg);
403 } else
404 pnfs_error_mark_layout_for_return(ino, lseg); 398 pnfs_error_mark_layout_for_return(ino, lseg);
405 ds = NULL; 399 ds = NULL;
406 } 400 }