summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-09-25 15:27:58 +0200
committerChuck Lever <chuck.lever@oracle.com>2023-10-16 18:44:28 +0200
commit69f5f0194a7f0f6bb22676a75dc81357a6d22698 (patch)
tree1af93e33c3de9d02b29372deea9a0c060f2a8916 /fs/nfsd/xdr4.h
parentNFSD: Make @lgp parameter of ->encode_layoutget a const pointer (diff)
downloadlinux-69f5f0194a7f0f6bb22676a75dc81357a6d22698.tar.xz
linux-69f5f0194a7f0f6bb22676a75dc81357a6d22698.zip
NFSD: Clean up nfsd4_encode_layoutget()
De-duplicate the open-coded stateid4 encoder. Adopt the use of the conventional current XDR encoding helpers. Refactor the encoder to align with the XDR specification. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '')
-rw-r--r--fs/nfsd/xdr4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 43b9c53b7795..1a99db22b25c 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -118,6 +118,8 @@ nfsd4_encode_uint64_t(struct xdr_stream *xdr, u64 val)
}
#define nfsd4_encode_changeid4(x, v) nfsd4_encode_uint64_t(x, v)
+#define nfsd4_encode_length4(x, v) nfsd4_encode_uint64_t(x, v)
+#define nfsd4_encode_offset4(x, v) nfsd4_encode_uint64_t(x, v)
/**
* nfsd4_encode_opaque_fixed - Encode a fixed-length XDR opaque type result