aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2021-09-30 17:06:21 -0400
committerJ. Bruce Fields <bfields@redhat.com>2021-10-02 16:10:01 -0400
commitdae9a6cab8009e526570e7477ce858dcdfeb256e (patch)
treec21c6f7c40a317463da96e10a98e05e9e5313090 /fs/nfsd/nfs4proc.c
parentSUNRPC: xdr_stream_subsegment() must handle non-zero page_bases (diff)
downloadlinux-dev-dae9a6cab8009e526570e7477ce858dcdfeb256e.tar.xz
linux-dev-dae9a6cab8009e526570e7477ce858dcdfeb256e.zip
NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()
Refactor. Now that the NFSv2 and NFSv3 XDR decoders have been converted to use xdr_streams, the WRITE decoder functions can use xdr_stream_subsegment() to extract the WRITE payload into its own xdr_buf, just as the NFSv4 WRITE XDR decoder currently does. That makes it possible to pass the first kvec, pages array + length, page_base, and total payload length via a single function parameter. The payload's page_base is not yet assigned or used, but will be in subsequent patches. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 3dc40c1d32bc..5895bbeba373 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1033,8 +1033,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
write->wr_how_written = write->wr_stable_how;
- nvecs = svc_fill_write_vector(rqstp, write->wr_payload.pages,
- write->wr_payload.head, write->wr_buflen);
+ nvecs = svc_fill_write_vector(rqstp, &write->wr_payload);
WARN_ON_ONCE(nvecs > ARRAY_SIZE(rqstp->rq_vec));
status = nfsd_vfs_write(rqstp, &cstate->current_fh, nf,