]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: fix _search_item_exists
authorSage Weil <sage@redhat.com>
Sat, 22 Nov 2014 01:37:03 +0000 (17:37 -0800)
committerLoic Dachary <ldachary@redhat.com>
Mon, 15 Dec 2014 09:26:42 +0000 (10:26 +0100)
Reported-by: Pawel Sadowski <ceph@sadziu.pl>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit eeadd60714d908a3a033aeb7fd542c511e63122b)

src/crush/CrushWrapper.cc

index 083cba88dabecec4c51c3f1738268c90c00c2728..e25a898ffcefd357ede8d2320e70da8bf22a64be 100644 (file)
@@ -171,8 +171,8 @@ bool CrushWrapper::_search_item_exists(int item) const
     if (!crush->buckets[i])
       continue;
     crush_bucket *b = crush->buckets[i];
-    for (unsigned i=0; i<b->size; ++i) {
-      if (b->items[i] == item)
+    for (unsigned j=0; j<b->size; ++j) {
+      if (b->items[j] == item)
        return true;
     }
   }