From: Samuel Just Date: Fri, 21 Aug 2020 23:06:55 +0000 (-0700) Subject: crimson/common/fixed_kv_node_layout: fix lower_bound X-Git-Tag: v16.1.0~983^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=39dee50f75d8b2ce91f6c5eb84245c2cae44c142;p=ceph.git crimson/common/fixed_kv_node_layout: fix lower_bound This went undetected because all existing users ensure that the key does not already exist. Signed-off-by: Samuel Just --- diff --git a/src/crimson/common/fixed_kv_node_layout.h b/src/crimson/common/fixed_kv_node_layout.h index b06a3cdcb4b2..d284716da726 100644 --- a/src/crimson/common/fixed_kv_node_layout.h +++ b/src/crimson/common/fixed_kv_node_layout.h @@ -371,7 +371,7 @@ public: const_iterator lower_bound(K l) const { auto ret = begin(); for (; ret != end(); ++ret) { - if (ret->get_key() > l) + if (ret->get_key() >= l) break; } return ret;