tdb2: fix argument order for tdb_gradual_lock.
[ccan] / ccan / tdb2 / lock.c
index c8dbf8267a8f9dab5fc92c9a3e7e810e6d8943d1..2b00584580810ad9aca0ae24dd6f880bd58d0796 100644 (file)
@@ -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",