--- common/lock.c.old 2013-06-04 15:21:30.000000000 +0100 +++ common/lock.c 2013-11-26 18:48:05.080172267 +0000 @@ -671,7 +671,7 @@ return 0; } - if (!mark_lock && tdb_brunlock(tdb, ltype, FREELIST_TOP, 0)) { + if (!mark_lock && tdb_brunlock(tdb, ltype, FREELIST_TOP, tdb->hash_size * 4)) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlockall failed (%s)\n", strerror(errno))); return -1; }