diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-08-03 16:24:49 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-13 17:55:44 +0200 |
commit | 0fcf6c02b205f80f24eb548b236543ec151cb01c (patch) | |
tree | b6995a6a5a7ca79d2d9d0f1c728f63cda66bbe6a /fs/ceph/quota.c | |
parent | 342ce1823ebaec573ac269b56bca78c698fec5c3 (diff) | |
download | linux-0fcf6c02b205f80f24eb548b236543ec151cb01c.tar.gz linux-0fcf6c02b205f80f24eb548b236543ec151cb01c.tar.bz2 linux-0fcf6c02b205f80f24eb548b236543ec151cb01c.zip |
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>
Diffstat (limited to 'fs/ceph/quota.c')
-rw-r--r-- | fs/ceph/quota.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c index 242bfa5c0539..32d4f13784ba 100644 --- a/fs/ceph/quota.c +++ b/fs/ceph/quota.c @@ -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); |