瀏覽代碼

nfsd4: read size estimate should include padding

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
J. Bruce Fields 11 年之前
父節點
當前提交
622f560e6a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/nfsd/nfs4proc.c

+ 1 - 1
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)