Skip to content

Commit 5d2db08

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFSv4: Clean up encode_nfs4_stateid()
Ensure that we encode the actual stateid, and not any metadata. Signed-off-by: Trond Myklebust <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 924cf3c commit 5d2db08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/nfs/nfs4xdr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,9 +1067,10 @@ static void encode_nops(struct compound_hdr *hdr)
10671067
*hdr->nops_p = htonl(hdr->nops);
10681068
}
10691069

1070-
static void encode_nfs4_stateid(struct xdr_stream *xdr, const nfs4_stateid *stateid)
1070+
static void encode_nfs4_stateid(struct xdr_stream *xdr,
1071+
const nfs4_stateid *stateid)
10711072
{
1072-
encode_opaque_fixed(xdr, stateid, NFS4_STATEID_SIZE);
1073+
encode_opaque_fixed(xdr, stateid->data, NFS4_STATEID_SIZE);
10731074
}
10741075

10751076
static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf)

0 commit comments

Comments
 (0)