Commit 2ecf943a authored by Rusty Russell's avatar Rusty Russell

tdb2: fix bucket search

We were previously jumping straight from the first bucket to the end.
parent e984ef66
......@@ -559,7 +559,7 @@ static tdb_off_t get_free(struct tdb_context *tdb,
b = size_to_bucket(tdb->zhdr.zone_bits, size);
for (b = find_free_head(tdb, b);
b <= BUCKETS_FOR_ZONE(tdb->zhdr.zone_bits);
b += find_free_head(tdb, b + 1)) {
b = find_free_head(tdb, b + 1)) {
/* Try getting one from list. */
off = lock_and_alloc(tdb, tdb->zone_off,
tdb->zhdr.zone_bits,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment