NFSv4: Fix the alignment of page data in the getdeviceinfo reply
We can fit the device_addr4 opaque data padding in the pages.
Fixes: cf500bac8f
("SUNRPC: Introduce rpc_prepare_reply_pages()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
9889981349
commit
046e5ccb41
|
@ -3009,15 +3009,19 @@ static void nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req,
|
||||||
struct compound_hdr hdr = {
|
struct compound_hdr hdr = {
|
||||||
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
|
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
|
||||||
};
|
};
|
||||||
|
uint32_t replen;
|
||||||
|
|
||||||
encode_compound_hdr(xdr, req, &hdr);
|
encode_compound_hdr(xdr, req, &hdr);
|
||||||
encode_sequence(xdr, &args->seq_args, &hdr);
|
encode_sequence(xdr, &args->seq_args, &hdr);
|
||||||
|
|
||||||
|
replen = hdr.replen + op_decode_hdr_maxsz;
|
||||||
|
|
||||||
encode_getdeviceinfo(xdr, args, &hdr);
|
encode_getdeviceinfo(xdr, args, &hdr);
|
||||||
|
|
||||||
/* set up reply kvec. Subtract notification bitmap max size (2)
|
/* set up reply kvec. device_addr4 opaque data is read into the
|
||||||
* so that notification bitmap is put in xdr_buf tail */
|
* pages */
|
||||||
rpc_prepare_reply_pages(req, args->pdev->pages, args->pdev->pgbase,
|
rpc_prepare_reply_pages(req, args->pdev->pages, args->pdev->pgbase,
|
||||||
args->pdev->pglen, hdr.replen - 2);
|
args->pdev->pglen, replen + 2 + 1);
|
||||||
encode_nops(&hdr);
|
encode_nops(&hdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue