From: Trond Myklebust Date: Thu, 13 Jun 2024 05:00:47 +0000 (-0400) Subject: NFSv4: Clean up encode_nfs4_stateid() X-Git-Tag: v6.11-rc1~121^2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d2db0898a569984c37c7afcfbb902fc5ff2817d;p=thirdparty%2Fkernel%2Flinux.git NFSv4: Clean up encode_nfs4_stateid() Ensure that we encode the actual stateid, and not any metadata. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4bf7d5c092826..7704a45096763 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -1067,9 +1067,10 @@ static void encode_nops(struct compound_hdr *hdr) *hdr->nops_p = htonl(hdr->nops); } -static void encode_nfs4_stateid(struct xdr_stream *xdr, const nfs4_stateid *stateid) +static void encode_nfs4_stateid(struct xdr_stream *xdr, + const nfs4_stateid *stateid) { - encode_opaque_fixed(xdr, stateid, NFS4_STATEID_SIZE); + encode_opaque_fixed(xdr, stateid->data, NFS4_STATEID_SIZE); } static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf)