tdb: use tdb_nest_lock() for open lock.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 22 Apr 2010 04:23:51 +0000 (13:53 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 22 Apr 2010 04:23:51 +0000 (13:53 +0930)
commit6812d81907793299e874f121174d885f6500f374
tree04a4f05c5f8d6d3bc4c2f4cd4409cd6688db028d
parent4ca1b96a70048b2eaa0d12fb5f0fdb54ec396aa3
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>
(Imported from commit 9136818df30c7179e1cffa18201cdfc990ebd7b7)
lib/tdb/common/lock.c
lib/tdb/common/open.c
lib/tdb/common/transaction.c