NFSD: Clean up nfsd4_encode_stateid()
authorChuck Lever <chuck.lever@oracle.com>
Mon, 25 Sep 2023 13:27:45 +0000 (09:27 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:28 +0000 (12:44 -0400)
commit40bb2baaa8edecfc21a3c176e4af1a3445157677
tree49066e83056489bcc54192213cc2ba8f8258fd0e
parent76bebcc7640eaac7213ab6ef97b3376733c69123
NFSD: Clean up nfsd4_encode_stateid()

Update the encoder function name to match the type name, as is the
convention with other such encoder utility functions, and with
nfsd4_decode_stateid4().

Make the @stateid argument a const so that callers of
nfsd4_encode_stateid4() in the future can be passed const pointers
to structures.

Since the compiler is allowed to add padding to structs, use the
wire (spec-defined) size when reserving buffer space.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c