X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Fhash.c;h=8bda587df88787ebed4d195ca8c57e4f909f3ed1;hb=f1069e4a2d5a8115695fb8ea3e78dbdcf389aead;hp=3db1ac2ebc7c85b9b50006138953ba38aafc7584;hpb=f6067e4cbd7b7415571f12438aec00faec5657fb;p=ccan diff --git a/ccan/tdb2/hash.c b/ccan/tdb2/hash.c index 3db1ac2e..8bda587d 100644 --- a/ccan/tdb2/hash.c +++ b/ccan/tdb2/hash.c @@ -861,7 +861,7 @@ enum TDB_ERROR tdb_chainlock(struct tdb_context *tdb, TDB_DATA key) "tdb_chainlock"); } -enum TDB_ERROR tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) +void tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) { uint64_t h = tdb_hash(tdb, key.dptr, key.dsize); tdb_off_t lockstart, locksize; @@ -873,6 +873,5 @@ enum TDB_ERROR tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) lockstart = hlock_range(group, &locksize); tdb_trace_1rec(tdb, "tdb_chainunlock", key); - return tdb->last_error = tdb_unlock_hashes(tdb, lockstart, locksize, - F_WRLCK); + tdb_unlock_hashes(tdb, lockstart, locksize, F_WRLCK); }