tdb: cleanup: tdb_have_extra_locks() helper
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 17 Feb 2010 02:04:26 +0000 (12:34 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 17 Feb 2010 02:04:26 +0000 (12:34 +1030)
commitfba42f1fb4f81b8913cce5a23ca5350ba45f40e1
treeede1d6f29fcb7af17af8b9010ef9247a9e397321
parentb754f61d235bdc3e410b60014d6be4072645e16f
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>
lib/tdb/common/lock.c
lib/tdb/common/open.c
lib/tdb/common/tdb_private.h
lib/tdb/common/transaction.c