]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/fixed_kv_node_layout: fix lower_bound
authorSamuel Just <sjust@redhat.com>
Fri, 21 Aug 2020 23:06:55 +0000 (16:06 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 23 Sep 2020 22:13:51 +0000 (15:13 -0700)
This went undetected because all existing users ensure that
the key does not already exist.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/fixed_kv_node_layout.h

index b06a3cdcb4b2f3c31ba1189eb6aa43ea9053a075..d284716da7267895a07fb37a232999bc3e9ca61d 100644 (file)
@@ -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;