ceph: don't drop message if it contains more data than expected

Later version mds may encode more data into messages.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Yan, Zheng
2018-08-03 16:24:49 +08:00
committed by Ilya Dryomov
parent 342ce1823e
commit 0fcf6c02b2
2 changed files with 4 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ void ceph_handle_quota(struct ceph_mds_client *mdsc,
struct inode *inode;
struct ceph_inode_info *ci;
if (msg->front.iov_len != sizeof(*h)) {
if (msg->front.iov_len < sizeof(*h)) {
pr_err("%s corrupt message mds%d len %d\n", __func__,
session->s_mds, (int)msg->front.iov_len);
ceph_msg_dump(msg);