tdb: cleanup: tdb_have_extra_locks() helper
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Feb 2010 03:04:10 +0000 (13:34 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Feb 2010 03:04:10 +0000 (13:34 +1030)
commitd92b8a7d9a050eb9735e48a8d37a5833500242d3
treebfcbe4ead8cff7cacdc2572b736c4fd4afec12ca
parent57c618f35d2aa244d444670c63a21e7a677c63c2
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>
ccan/tdb/lock.c
ccan/tdb/open.c
ccan/tdb/tdb_private.h
ccan/tdb/transaction.c