“8854700115ecf8aa6f087aa915b7b6cf18090d39”上不存在“arch/mips/include/asm/kdebug.h”
提交 36357fe7 编写于 作者: A Anna Schumaker 提交者: Trond Myklebust

NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS

The scratch_buf array is 16 bytes, but I was passing 32 to the
xdr_set_scratch_buffer() function. Fix this by using sizeof(), which is
what I probably should have been doing this whole time.

Fixes: d3b00a80 ("NFS: Replace the READ_PLUS decoding code")
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 50fa355b
...@@ -1142,7 +1142,7 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res) ...@@ -1142,7 +1142,7 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res)
if (!segs) if (!segs)
return -ENOMEM; return -ENOMEM;
xdr_set_scratch_buffer(xdr, &scratch_buf, 32); xdr_set_scratch_buffer(xdr, &scratch_buf, sizeof(scratch_buf));
status = -EIO; status = -EIO;
for (i = 0; i < segments; i++) { for (i = 0; i < segments; i++) {
status = decode_read_plus_segment(xdr, &segs[i]); status = decode_read_plus_segment(xdr, &segs[i]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册