From 39dee50f75d8b2ce91f6c5eb84245c2cae44c142 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 21 Aug 2020 16:06:55 -0700 Subject: [PATCH] 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 --- src/crimson/common/fixed_kv_node_layout.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/common/fixed_kv_node_layout.h b/src/crimson/common/fixed_kv_node_layout.h index b06a3cdcb4b2f..d284716da7267 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; -- 2.39.5