NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 30 Sep 2021 21:06:21 +0000 (17:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:33 +0000 (19:12 +0100)
commit2de88544b3dbe9f4be3220750e34c97dd86386c1
tree2523667ff6fa8cb2590c8c39369f122539ce4394
parent771aca9bc70709771f66c3e7c00ce87339aa1790
NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()

[ Upstream commit dae9a6cab8009e526570e7477ce858dcdfeb256e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs3proc.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfsproc.c
fs/nfsd/nfsxdr.c
fs/nfsd/xdr.h
fs/nfsd/xdr3.h
include/linux/sunrpc/svc.h
net/sunrpc/svc.c