]> git.ozlabs.org Git - ccan/commitdiff
tdb: fix locking unlocking error introduced in cleanup
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 18 Aug 2009 08:43:33 +0000 (18:13 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 18 Aug 2009 08:43:33 +0000 (18:13 +0930)
ccan/tdb/lock.c

index e6b900e419ea00a5b2610ec0ee939157ba665431..41c383822433c654a441b0bca065b769bb494e3f 100644 (file)
@@ -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;