tdb: use tdb_nest_lock() for open lock.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Feb 2010 03:36:02 +0000 (14:06 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Feb 2010 03:36:02 +0000 (14:06 +1030)
commite9989ef0758b3b660abf444d014c5b51a3a7c1b4
tree2eb7f060bfbbea968f1f795e865e68e09ff4ce3c
parent99e576ac94fd86fcba188fb72ced9e8087ac1680
tdb: use tdb_nest_lock() for open lock.

This never nests, so it's overkill, but it centralizes the locking into
lock.c and removes the ugly flag in the transaction code to track whether
we have the lock or not.

Note that we have a temporary hack so this places a real lock, despite
the fact that we are in a transaction.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tdb/lock.c
ccan/tdb/open.c
ccan/tdb/transaction.c