NFSD: Update nfsd_cache_append() to use xdr_stream
authorChuck Lever <chuck.lever@oracle.com>
Fri, 10 Nov 2023 16:28:39 +0000 (11:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:20:12 +0000 (17:20 +0000)
commit68eb0889fd03fb8e7518aeabb5d2064a01a3cfd3
treea7b19c98b29138be8259f8ed03750e397b362036
parent47a9c946d850671c2492bb0cc20f151a3648a6de
NFSD: Update nfsd_cache_append() to use xdr_stream

commit 49cecd8628a9855cd993792a0377559ea32d5e7c upstream.

When inserting a DRC-cached response into the reply buffer, ensure
that the reply buffer's xdr_stream is updated properly. Otherwise
the server will send a garbage response.

Cc: stable@vger.kernel.org # v6.3+
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfscache.c