summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2024-06-13 01:00:47 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2024-07-08 13:47:26 -0400
commit5d2db0898a569984c37c7afcfbb902fc5ff2817d (patch)
tree0df6302bbb220a7995cb7c676b9724027a4dc585
parent924cf3c91fe29c7ebd1b9d56e10f513c1bd7d4bd (diff)
downloadlwn-5d2db0898a569984c37c7afcfbb902fc5ff2817d.tar.gz
lwn-5d2db0898a569984c37c7afcfbb902fc5ff2817d.zip
NFSv4: Clean up encode_nfs4_stateid()
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>
-rw-r--r--fs/nfs/nfs4xdr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 4bf7d5c09282..7704a4509676 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)