summaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2016-05-17 12:28:42 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-17 15:48:10 -0400
commit6d597e1750126a2c6fd99e4b2cc176955bb9972e (patch)
treeaf032e776b004aa26ad48c0e91123253e63b7e37 /fs/nfs/callback_proc.c
parent3982a6a2d0e64441c938f4e7f93985aff37d8fb3 (diff)
downloadlinux-6d597e1750126a2c6fd99e4b2cc176955bb9972e.tar.gz
linux-6d597e1750126a2c6fd99e4b2cc176955bb9972e.tar.bz2
linux-6d597e1750126a2c6fd99e4b2cc176955bb9972e.zip
pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args
LAYOUTRETURN is "special" in that servers and clients are expected to work with old stateids. When the client sends a LAYOUTRETURN with an old stateid in it then the server is expected to only tear down layout segments that were present when that seqid was current. Ensure that the client handles its accounting accordingly. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 7c9fbf504f07..aaa2e8d3df6f 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -217,7 +217,8 @@ static u32 initiate_file_draining(struct nfs_client *clp,
}
if (pnfs_mark_matching_lsegs_return(lo, &free_me_list,
- &args->cbl_range)) {
+ &args->cbl_range,
+ be32_to_cpu(args->cbl_stateid.seqid))) {
rv = NFS4_OK;
goto unlock;
}