Commit fb700ef0 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent de144ff4
...@@ -2410,9 +2410,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp) ...@@ -2410,9 +2410,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
.iomode = IOMODE_ANY, .iomode = IOMODE_ANY,
.length = NFS4_MAX_UINT64, .length = NFS4_MAX_UINT64,
}; };
pnfs_set_plh_return_info(lo, IOMODE_ANY, 0); pnfs_mark_matching_lsegs_return(lo, &free_me, &range, 0);
pnfs_mark_matching_lsegs_return(lo, &lo->plh_return_segs,
&range, 0);
goto out_forget; goto out_forget;
} else { } else {
/* We have a completely new layout */ /* We have a completely new layout */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment