tdb: use tdb_nest_lock() for open lock.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Feb 2010 03:28:07 +0000 (13:58 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Feb 2010 03:28:07 +0000 (13:58 +1030)
commit9136818df30c7179e1cffa18201cdfc990ebd7b7
treee52bacd6be1238bdf194f7db72824227aca79593
parente8fa70a321d489b454b07bd65e9b0d95084168de
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>
lib/tdb/common/lock.c
lib/tdb/common/open.c
lib/tdb/common/transaction.c