[PATCH v2 2/7] ceph: skip the memories when received a higher version of message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux