tdb: cleanup: tdb_have_extra_locks() helper
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)
commitdda3587dfee598f387c2e696f3645486fac65052
treee0dc938c3156eefe59e6694d99d2fff5100af57a
parent495f3554259b9dbf9ee673c4fe420d98e50e4901
tdb: cleanup: tdb_have_extra_locks() helper

In many places we check whether locks are held: add a helper to do this.

The _tdb_lockall() case has already checked for the allrecord lock, so
the extra work done by tdb_have_extra_locks() is merely redundant.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from commit fba42f1fb4f81b8913cce5a23ca5350ba45f40e1)
lib/tdb/common/lock.c
lib/tdb/common/open.c
lib/tdb/common/tdb_private.h
lib/tdb/common/transaction.c