NFSv4.2: Rework scratch handling for READ_PLUS
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 6 Apr 2023 19:16:52 +0000 (15:16 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 28 Apr 2023 19:48:45 +0000 (15:48 -0400)
commitfbd2a05f29a95d5b42b294bf47e55a711424965b
tree065a16290f26fa11199e2ce8f077748743ead50c
parente025f0a73f6acb920d86549b2177a5883535421d
NFSv4.2: Rework scratch handling for READ_PLUS

Instead of using a tiny, static scratch buffer, we should use a kmalloc()-ed
buffer that is allocated when checking for read plus usage. This lets us
use the buffer before decoding any part of the READ_PLUS operation
instead of setting it right before segment decoding, meaning it should
be a little more robust.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs42xdr.c
fs/nfs/nfs4proc.c
include/linux/nfs_xdr.h