A year after the last modification of test to check if an item was added
twice to the same bucket, the subtree_contains test was added a few
lines above it, making it redundant.
Signed-off-by: Loic Dachary <loic@dachary.org>
return -EINVAL;
}
-
- // make sure the item doesn't already exist in this bucket
- for (unsigned j=0; j<b->size; j++)
- if (b->items[j] == cur) {
- ldout(cct, 1) << "insert_item " << cur << " already exists in bucket " << b->id << dendl;
- return -EEXIST;
- }
-
// are we forming a loop?
if (subtree_contains(cur, b->id)) {
ldout(cct, 1) << "insert_item " << cur << " already contains " << b->id