From: Changcheng Liu Date: Thu, 30 Apr 2020 03:18:36 +0000 (+0800) Subject: msg: correct read result check X-Git-Tag: v16.1.0~1595^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34848%2Fhead;p=ceph.git msg: correct read result check The "r >= 0" is checked under "r <= 0", so the right condition is "r == 0". Signed-off-by: Changcheng Liu --- diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 603a9a526e5d..c23b71e9052a 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -756,7 +756,7 @@ CtPtr ProtocolV2::read(CONTINUATION_RXBPTR_TYPE &next, }); if (r <= 0) { // error or done synchronously - if (unlikely(pre_auth.enabled) && r >= 0) { + if (unlikely(pre_auth.enabled) && r == 0) { pre_auth.rxbuf.append(*next.node); ceph_assert(!cct->_conf->ms_die_on_bug || pre_auth.rxbuf.length() < 1000000);