Re: [PATCH v3] ceph: skip the memories when received a higher version of message

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

 




On 3/1/22 10:43 PM, Jeff Layton wrote:
On Tue, 2022-03-01 at 22:39 +0800, xiubli@xxxxxxxxxx wrote:
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 | 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;
Feel free to fold this into the appropriate patch in wip-fscrypt if you
like...

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>

Sure.




[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