From: Rusty Russell Date: Tue, 18 Aug 2009 08:43:33 +0000 (+0930) Subject: tdb: fix locking unlocking error introduced in cleanup X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=089a515a2babd1d3a157239d3bcfd3024c2ef513;ds=sidebyside tdb: fix locking unlocking error introduced in cleanup --- diff --git a/ccan/tdb/lock.c b/ccan/tdb/lock.c index e6b900e4..41c38382 100644 --- a/ccan/tdb/lock.c +++ b/ccan/tdb/lock.c @@ -508,7 +508,7 @@ static int _tdb_unlockall(struct tdb_context *tdb, int ltype, bool mark_lock) } if (!mark_lock && - tdb->methods->brunlock(tdb, F_WRLCK, + tdb->methods->brunlock(tdb, ltype, FREELIST_TOP, 4*tdb->header.hash_size)) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlockall failed (%s)\n", strerror(errno))); return -1;