(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

nfsd: use xdr_encode_opaque_fixed for all GETXATTR fragments

nfsd4_vbuf_to_stream() encodes the first fragment and a short final fragment with xdr_encode_opaque_fixed(), but copies each full-page fragment in the loop with a bare memcpy(). A PAGE_SIZE fragment is a whole number of XDR words, so the memcpy() leaves no padding unwritten; the two code paths differ in form, not in result. Encode every fragment with xdr_encode_opaque_fixed(). The short-fragment branch then reduces to the loop exit, and the padding comment it carried goes with it. Suggested-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> [ cel: Rewrote commit message ] Reviewed-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260915173902.3184534-1-qwe.aldo@gmail.com Signed-off-by: Chuck Lever <cel@kernel.org>


Author Aldo Ariel Panzardo Committer Chuck Lever Date Commit Parent fcc202d3
+2 -10
1 changed file
+2 -10
1 changed file