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>
This commit is contained in:
Anna Schumaker
2023-04-06 15:16:52 -04:00
parent e025f0a73f
commit fbd2a05f29
3 changed files with 15 additions and 7 deletions

View File

@@ -670,6 +670,7 @@ struct nfs_pgio_res {
struct {
unsigned int replen; /* used by read */
int eof; /* used by read */
void * scratch; /* used by read */
};
struct {
struct nfs_writeverf * verf; /* used by write */