From: Sage Weil Date: Thu, 3 Nov 2016 18:14:33 +0000 (-0400) Subject: os/kstore: fix collection_list end bound off-by-one X-Git-Tag: v11.1.0~418^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11771%2Fhead;p=ceph.git os/kstore: fix collection_list end bound off-by-one Signed-off-by: Sage Weil --- diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index ed10be43fc16..443133043d20 100755 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -1498,7 +1498,7 @@ int KStore::_collection_list( } dout(20) << __func__ << " pend " << pretty_binary_string(pend) << dendl; while (true) { - if (!it->valid() || it->key() > pend) { + if (!it->valid() || it->key() >= pend) { if (!it->valid()) dout(20) << __func__ << " iterator not valid (end of db?)" << dendl; else