]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
SUNRPC: Prepare for xdr_stream-style decoding on the server-side
authorChuck Lever <chuck.lever@oracle.com>
Thu, 5 Nov 2020 16:19:42 +0000 (11:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:34 +0000 (14:52 +0200)
commit79e4e0d489c8e72b9efa388e504a036eec1550c6
tree3c884154d1beb09c491a0a00008201774b4b1b4a
parent2f46cc814106962a5b2a674cd9ff576b7dd00460
SUNRPC: Prepare for xdr_stream-style decoding on the server-side

[ Upstream commit 5191955d6fc65e6d4efe8f4f10a6028298f57281 ]

A "permanent" struct xdr_stream is allocated in struct svc_rqst so
that it is usable by all server-side decoders. A per-rqst scratch
buffer is also allocated to handle decoding XDR data items that
cross page boundaries.

To demonstrate how it will be used, add the first call site for the
new svcxdr_init_decode() API.

As an additional part of the overall conversion, add symbolic
constants for successful and failed XDR operations. Returning "0" is
overloaded. Sometimes it means something failed, but sometimes it
means success. To make it more clear when XDR decoding functions
succeed or fail, introduce symbolic constants.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfssvc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c