]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/open.c
tdb2: tdb_lockall() and tdb_lockall_read() support.
[ccan] / ccan / tdb2 / open.c
index f7d6b3c5f3e5dbe356d9b842fcb1c30c36e93800..7bb50f1db5964ae13687f0c792fab5a8603e8481 100644 (file)
@@ -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);