X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Fopen.c;h=7bb50f1db5964ae13687f0c792fab5a8603e8481;hp=f7d6b3c5f3e5dbe356d9b842fcb1c30c36e93800;hb=5e7b20d01b4790e15323679f9bb94520d46b4aaa;hpb=45e9956d665dc8819eb183ae239581410dcecdb3 diff --git a/ccan/tdb2/open.c b/ccan/tdb2/open.c index f7d6b3c5..7bb50f1d 100644 --- a/ccan/tdb2/open.c +++ b/ccan/tdb2/open.c @@ -456,7 +456,7 @@ fail_errno: #endif free(cast_const(char *, tdb->name)); if (tdb->file) { - tdb_unlock_all(tdb); + tdb_lock_cleanup(tdb); if (--tdb->file->refcnt == 0) { assert(tdb->file->num_lockrecs == 0); if (tdb->file->map_ptr) { @@ -499,7 +499,7 @@ int tdb_close(struct tdb_context *tdb) if (tdb->file) { struct tdb_file **i; - tdb_unlock_all(tdb); + tdb_lock_cleanup(tdb); if (--tdb->file->refcnt == 0) { ret = close(tdb->file->fd);