From: Xiubo Li <xiubli@xxxxxxxxxx> We should skip the extra memories which are from the higher version just likes the libcephfs client does. URL: https://tracker.ceph.com/issues/54430 Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx> --- fs/ceph/mds_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 94b4c6508044..3dea96df4769 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -326,6 +326,7 @@ static int parse_reply_info_lease(void **p, void *end, goto bad; ceph_decode_32_safe(p, end, struct_len, bad); + end = *p + struct_len; } else { struct_len = sizeof(**lease); *altname_len = 0; @@ -346,6 +347,7 @@ static int parse_reply_info_lease(void **p, void *end, *altname = NULL; *altname_len = 0; } + *p = end; } return 0; bad: -- 2.27.0