aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2018-06-27 10:42:51 -0400
committerIlya Dryomov <idryomov@gmail.com>2018-08-02 15:26:11 -0400
commitc9ed51c9123ab5e8f79b7d53a9afd786b43d4fe6 (patch)
tree705775edaad9b421f78b57f51dd6031f7a6d2bf1
parent6d54228fd1f293d00576ab2c3d2e4992c7cce12f (diff)
libceph: change ceph_pagelist_encode_string() to take u32
The wire format dictates that the length of string fits into 4 bytes. Take u32 instead of size_t to reflect that. We were already truncating len in ceph_pagelist_encode_32() -- this just pushes that truncation one level up. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--include/linux/ceph/pagelist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ceph/pagelist.h b/include/linux/ceph/pagelist.h
index 7edcded07641..d0223364349f 100644
--- a/include/linux/ceph/pagelist.h
+++ b/include/linux/ceph/pagelist.h
@@ -68,7 +68,7 @@ static inline int ceph_pagelist_encode_8(struct ceph_pagelist *pl, u8 v)
68 return ceph_pagelist_append(pl, &v, 1); 68 return ceph_pagelist_append(pl, &v, 1);
69} 69}
70static inline int ceph_pagelist_encode_string(struct ceph_pagelist *pl, 70static inline int ceph_pagelist_encode_string(struct ceph_pagelist *pl,
71 char *s, size_t len) 71 char *s, u32 len)
72{ 72{
73 int ret = ceph_pagelist_encode_32(pl, len); 73 int ret = ceph_pagelist_encode_32(pl, len);
74 if (ret) 74 if (ret)