From 9b98acbba304f2c1c1fba5bda672e1005151e526 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:35:13 +0930 Subject: tdb2: Make TDB1 code use TDB2's open flags. This means getting rid of TDB_VOLATILE (perhaps we should use an attribute for that?), TDB_INCOMPATIBLE_HASH (use the tdb_attribute_hash for that) and TDB_CLEAR_IF_FIRST (use the tdb_attribute_openhook for that). We also get rid of TDB_DISALLOW_NESTING: that's the default for TDB2. Signed-off-by: Rusty Russell (Imported from CCAN commit 22d0e0dc59fc9d7e0046fec6971ef478c2d604fd) --- lib/tdb2/tdb1_lock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/tdb2/tdb1_lock.c') diff --git a/lib/tdb2/tdb1_lock.c b/lib/tdb2/tdb1_lock.c index c427804893..0fba7423a2 100644 --- a/lib/tdb2/tdb1_lock.c +++ b/lib/tdb2/tdb1_lock.c @@ -134,7 +134,7 @@ int tdb1_brlock(struct tdb1_context *tdb, { int ret; - if (tdb->flags & TDB1_NOLOCK) { + if (tdb->flags & TDB_NOLOCK) { return 0; } @@ -168,7 +168,7 @@ int tdb1_brunlock(struct tdb1_context *tdb, { int ret; - if (tdb->flags & TDB1_NOLOCK) { + if (tdb->flags & TDB_NOLOCK) { return 0; } @@ -257,7 +257,7 @@ int tdb1_nest_lock(struct tdb1_context *tdb, uint32_t offset, int ltype, offset, ltype); return -1; } - if (tdb->flags & TDB1_NOLOCK) + if (tdb->flags & TDB_NOLOCK) return 0; new_lck = tdb1_find_nestlock(tdb, offset); @@ -377,7 +377,7 @@ int tdb1_nest_unlock(struct tdb1_context *tdb, uint32_t offset, int ltype) int ret = -1; struct tdb1_lock_type *lck; - if (tdb->flags & TDB1_NOLOCK) + if (tdb->flags & TDB_NOLOCK) return 0; /* Sanity checks */ -- cgit