]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NFSv4: Clean up encode_nfs4_stateid()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 13 Jun 2024 05:00:47 +0000 (01:00 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Jul 2024 17:47:26 +0000 (13:47 -0400)
Ensure that we encode the actual stateid, and not any metadata.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4xdr.c

index 4bf7d5c092826f46f9bd28a42fe615ed5c4dd900..7704a45096763f9d0f06ad5e873a393f4ddc8c3c 100644 (file)
@@ -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)