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

tdb2: fix argument order for tdb_gradual_lock.

This explains why most of tdb_gradual_lock was not tested: thanks gcov!
parent ecec5bef
......@@ -485,8 +485,8 @@ int tdb_allrecord_lock(struct tdb_context *tdb, int ltype,
/* Lock all the hash buckets. */
again:
hash_size = (1ULL << tdb->header.v.hash_bits);
if (tdb_lock_gradual(tdb, ltype, TDB_HASH_LOCK_START,
1ULL << tdb->header.v.hash_bits, flags)) {
if (tdb_lock_gradual(tdb, ltype, flags, TDB_HASH_LOCK_START,
hash_size)) {
if (!(flags & TDB_LOCK_PROBE)) {
tdb->log(tdb, TDB_DEBUG_ERROR, tdb->log_priv,
"tdb_lockall hashes failed (%s)\n",
......
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