Skip to content
Commit 9ed5af26 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Clean up the handling of page padding in rpc_prepare_reply_pages()

rpc_prepare_reply_pages() currently expects the 'hdrsize' argument to
contain the length of the data that we expect to want placed in the head
kvec plus a count of 1 word of padding that is placed after the page data.
This is very confusing when trying to read the code, and sometimes leads
to callers adding an arbitrary value of '1' just in order to satisfy the
requirement (whether or not the page data actually needs such padding).

This patch aims to clarify the code by changing the 'hdrsize' argument
to remove that 1 word of padding. This means we need to subtract the
padding from all the existing callers.

Fixes: 02ef04e4

 ("NFS: Account for XDR pad of buf->pages")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 1d973166
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment