From: J. Bruce Fields Date: Fri, 16 May 2014 18:38:20 +0000 (-0400) Subject: nfsd4: read size estimate should include padding X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=622f560e6afbd54cdd9b9a416ddab8114baedd76;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git nfsd4: read size estimate should include padding Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 2c1ee70b730f..77c43697cd4f 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1489,7 +1489,7 @@ static inline u32 nfsd4_read_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) if (rlen > maxcount) rlen = maxcount; - return (op_encode_hdr_size + 2) * sizeof(__be32) + rlen; + return (op_encode_hdr_size + 2 + XDR_QUADLEN(rlen)) * sizeof(__be32); } static inline u32 nfsd4_readdir_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)