]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFSD: Fix callback decoder status codes
authorChuck Lever <chuck.lever@oracle.com>
Mon, 10 Feb 2025 17:03:32 +0000 (12:03 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 10 Mar 2025 13:11:04 +0000 (09:11 -0400)
commit8ce35dcaf3aed7113cd692759dc0a26cec8cd0c3
tree97f55a21b6b54f6e45303b49abe094de2d78f14a
parent4b54b85e38919f7a0d27ae340600ffdcf97c12d5
NFSD: Fix callback decoder status codes

fs/nfsd/nfs4callback.c implements a callback client. Thus its XDR
decoders are decoding replies, not calls.

NFS4ERR_BAD_XDR is an on-the-wire status code that reports that the
client sent a corrupted RPC /call/. It's not used as the internal
error code when a /reply/ can't be decoded, since that kind of
failure is never reported to the sender of that RPC message.

Instead, a reply decoder should return -EIO, as the reply decoders
in the NFS client do.

Fixes: 6487a13b5c6b ("NFSD: add support for CB_GETATTR callback")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4callback.c