summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-04-15 17:33:07 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-04-18 15:10:53 -0400
commitfb700ef026766c95578aafc0db1b208946e7ad4f (patch)
tree523b34b6026a46a5595722ba5c5914c94c6b9eaa /fs/nfs
parentde144ff4234f935bd2150108019b5d87a90a8a96 (diff)
NFSv4.1: Simplify layout return in pnfs_layout_process()
If the server hands us a layout that does not match the one we currently hold, then have pnfs_mark_matching_lsegs_return() just ditch the old layout if NFS_LSEG_LAYOUTRETURN is not set. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pnfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index f726f8b12b7e..03e0b34c4a64 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2410,9 +2410,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
.iomode = IOMODE_ANY,
.length = NFS4_MAX_UINT64,
};
- pnfs_set_plh_return_info(lo, IOMODE_ANY, 0);
- pnfs_mark_matching_lsegs_return(lo, &lo->plh_return_segs,
- &range, 0);
+ pnfs_mark_matching_lsegs_return(lo, &free_me, &range, 0);
goto out_forget;
} else {
/* We have a completely new layout */