summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-02-19 16:08:29 -0500
committerBen Hutchings <ben@decadent.org.uk>2017-06-05 21:17:13 +0100
commit5da99487e97c80c5dfc9f98d372f9ba72d094f25 (patch)
treefbcd82102568062da5408bd9b4cc0d65ce46af44 /fs
parent72ffee66e25564619a5d60d516a45d5d36971353 (diff)
downloadlinux-stable-5da99487e97c80c5dfc9f98d372f9ba72d094f25.tar.gz
linux-stable-5da99487e97c80c5dfc9f98d372f9ba72d094f25.tar.bz2
linux-stable-5da99487e97c80c5dfc9f98d372f9ba72d094f25.zip
NFSv4: Fix the underestimation of delegation XDR space reservation
commit 5a1f6d9e9b803003271b40b67786ff46fa4eda01 upstream. Account for the "space_limit" field in struct open_write_delegation4. Fixes: 2cebf82883f4 ("NFSv4: Fix the underestimate of NFSv4 open request size") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4xdr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 939ae606cfa4..aecf012d73b4 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -165,8 +165,10 @@ static int nfs4_stat_to_errno(int);
open_owner_id_maxsz + \
encode_opentype_maxsz + \
encode_claim_null_maxsz)
+#define decode_space_limit_maxsz (3)
#define decode_ace_maxsz (3 + nfs4_owner_maxsz)
#define decode_delegation_maxsz (1 + decode_stateid_maxsz + 1 + \
+ decode_space_limit_maxsz + \
decode_ace_maxsz)
#define decode_change_info_maxsz (5)
#define decode_open_maxsz (op_decode_hdr_maxsz + \