diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-18 22:30:25 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 05:38:05 +0200 |
commit | cab6e116786641e28747de3f70c8cd89ba17673f (patch) | |
tree | e41622bfd16ed94a6bb67a91a409ac970a22c533 /lib/tdb2/hash.c | |
parent | 6244f668a34279e6da62213333dfb32c3ccdb17d (diff) | |
download | samba-cab6e116786641e28747de3f70c8cd89ba17673f.tar.gz samba-cab6e116786641e28747de3f70c8cd89ba17673f.tar.bz2 samba-cab6e116786641e28747de3f70c8cd89ba17673f.zip |
TDB2: remove TDB1 compatibility.
This rips out all the TDB1 compatibility from tdb2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb2/hash.c')
-rw-r--r-- | lib/tdb2/hash.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/tdb2/hash.c b/lib/tdb2/hash.c index 0d4d7805ce..067884a74e 100644 --- a/lib/tdb2/hash.c +++ b/lib/tdb2/hash.c @@ -853,11 +853,6 @@ static enum TDB_ERROR chainlock(struct tdb_context *tdb, const TDB_DATA *key, contention - it cannot guarantee how many records will be locked */ _PUBLIC_ enum TDB_ERROR tdb_chainlock(struct tdb_context *tdb, TDB_DATA key) { - if (tdb->flags & TDB_VERSION1) { - if (tdb1_chainlock(tdb, key) == -1) - return tdb->last_error; - return TDB_SUCCESS; - } return tdb->last_error = chainlock(tdb, &key, F_WRLCK, TDB_LOCK_WAIT, "tdb_chainlock"); } @@ -868,11 +863,6 @@ _PUBLIC_ void tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) tdb_off_t lockstart, locksize; unsigned int group, gbits; - if (tdb->flags & TDB_VERSION1) { - tdb1_chainunlock(tdb, key); - return; - } - gbits = TDB_TOPLEVEL_HASH_BITS - TDB_HASH_GROUP_BITS; group = bits_from(h, 64 - gbits, gbits); @@ -884,11 +874,6 @@ _PUBLIC_ void tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) _PUBLIC_ enum TDB_ERROR tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key) { - if (tdb->flags & TDB_VERSION1) { - if (tdb1_chainlock_read(tdb, key) == -1) - return tdb->last_error; - return TDB_SUCCESS; - } return tdb->last_error = chainlock(tdb, &key, F_RDLCK, TDB_LOCK_WAIT, "tdb_chainlock_read"); } @@ -899,10 +884,6 @@ _PUBLIC_ void tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key) tdb_off_t lockstart, locksize; unsigned int group, gbits; - if (tdb->flags & TDB_VERSION1) { - tdb1_chainunlock_read(tdb, key); - return; - } gbits = TDB_TOPLEVEL_HASH_BITS - TDB_HASH_GROUP_BITS; group = bits_from(h, 64 - gbits, gbits); |