提交 2220f13a 编写于 作者: B Benny Halevy 提交者: Trond Myklebust

nfs: nfs4xdr: encode_compound_hdr does not have to round up reserved bytes

This is already done by xdr_reserve_space and since encode_compound_hdr
is adding a byte count to "12" which is already word aligned, the xdr
level rounding will work just as well.
Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 42edd698
......@@ -740,7 +740,7 @@ static void encode_compound_hdr(struct xdr_stream *xdr,
dprintk("encode_compound: tag=%.*s\n", (int)hdr->taglen, hdr->tag);
BUG_ON(hdr->taglen > NFS4_MAXTAGLEN);
RESERVE_SPACE(12+(XDR_QUADLEN(hdr->taglen)<<2));
RESERVE_SPACE(12 + hdr->taglen);
*p++ = cpu_to_be32(hdr->taglen);
p = xdr_encode_opaque_fixed(p, hdr->tag, hdr->taglen);
*p++ = cpu_to_be32(hdr->minorversion);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册