X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Flock.c;h=b1153b2e6f72b20f81e65f135d1d56f051036727;hp=73d34417e727196b56c1787f2b84bfc97a618d4e;hb=bbf2f9cef4bdbb3841869e9b87f234886985f7e8;hpb=5945c4dc1eed81c189b62612ca3c003a36e0c247 diff --git a/ccan/tdb/lock.c b/ccan/tdb/lock.c index 73d34417..b1153b2e 100644 --- a/ccan/tdb/lock.c +++ b/ccan/tdb/lock.c @@ -449,9 +449,7 @@ static int _tdb_lockall(struct tdb_context *tdb, int ltype, return -1; } - if (tdb->methods->brlock(tdb, ltype, - FREELIST_TOP, 4*tdb->header.hash_size, - flags)) { + if (tdb->methods->brlock(tdb, ltype, FREELIST_TOP, 0, flags)) { if (flags & TDB_LOCK_WAIT) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_lockall failed (%s)\n", strerror(errno))); } @@ -486,8 +484,7 @@ static int _tdb_unlockall(struct tdb_context *tdb, int ltype, bool mark_lock) } if (!mark_lock && - tdb->methods->brunlock(tdb, ltype, - FREELIST_TOP, 4*tdb->header.hash_size)) { + tdb->methods->brunlock(tdb, ltype, FREELIST_TOP, 0)) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlockall failed (%s)\n", strerror(errno))); return -1; } @@ -688,8 +685,7 @@ void tdb_release_extra_locks(struct tdb_context *tdb) unsigned int i, extra = 0; if (tdb->allrecord_lock.count != 0) { - tdb_brunlock(tdb, tdb->allrecord_lock.ltype, - FREELIST_TOP, 4*tdb->header.hash_size); + tdb_brunlock(tdb, tdb->allrecord_lock.ltype, FREELIST_TOP, 0); tdb->allrecord_lock.count = 0; }