summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs4xdr.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index af11e8b5d367..de4cb5cfc318 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -885,6 +885,14 @@ static __be32 *reserve_space(struct xdr_stream *xdr, size_t nbytes)
885 return p; 885 return p;
886} 886}
887 887
888static void encode_opaque_fixed(struct xdr_stream *xdr, const void *buf, size_t len)
889{
890 __be32 *p;
891
892 p = xdr_reserve_space(xdr, len);
893 xdr_encode_opaque_fixed(p, buf, len);
894}
895
888static void encode_string(struct xdr_stream *xdr, unsigned int len, const char *str) 896static void encode_string(struct xdr_stream *xdr, unsigned int len, const char *str)
889{ 897{
890 __be32 *p; 898 __be32 *p;
@@ -922,11 +930,7 @@ static void encode_nops(struct compound_hdr *hdr)
922 930
923static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf) 931static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf)
924{ 932{
925 __be32 *p; 933 encode_opaque_fixed(xdr, verf->data, NFS4_VERIFIER_SIZE);
926
927 p = xdr_reserve_space(xdr, NFS4_VERIFIER_SIZE);
928 BUG_ON(p == NULL);
929 xdr_encode_opaque_fixed(p, verf->data, NFS4_VERIFIER_SIZE);
930} 934}
931 935
932static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const struct nfs_server *server) 936static void encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const struct nfs_server *server)