CEPH filesystem development
 help / color / mirror / Atom feed
* [PATCH v3] ceph: skip the memories when received a higher version of message
@ 2022-03-01 14:39 xiubli
  2022-03-01 14:43 ` Jeff Layton
  0 siblings, 1 reply; 4+ messages in thread
From: xiubli @ 2022-03-01 14:39 UTC (permalink / raw)
  To: jlayton; +Cc: idryomov, vshankar, ceph-devel, Xiubo Li

From: Xiubo Li <xiubli@redhat.com>

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@redhat.com>
---
 fs/ceph/mds_client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 94b4c6508044..608d077f2eeb 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
 {
 	u8 struct_v;
 	u32 struct_len;
+	void *lend;
 
 	if (features == (u64)-1) {
 		u8 struct_compat;
@@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
 		*altname = NULL;
 	}
 
+	lend = *p + struct_len;
 	ceph_decode_need(p, end, struct_len, bad);
 	*lease = *p;
 	*p += sizeof(**lease);
@@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
 			*altname_len = 0;
 		}
 	}
+	*p = lend;
 	return 0;
 bad:
 	return -EIO;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-02  6:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01 14:39 [PATCH v3] ceph: skip the memories when received a higher version of message xiubli
2022-03-01 14:43 ` Jeff Layton
2022-03-01 14:45   ` Xiubo Li
2022-03-02  6:17   ` Xiubo Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox