diff options
author | Volker Lendecke <vl@samba.org> | 2012-12-20 16:36:02 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-02-05 13:18:28 +0100 |
commit | 72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591 (patch) | |
tree | 345e21bb28f13b724fa9ec8ff28b266a2c06ec79 /lib/tdb/common/lock.c | |
parent | 71247ec4bdefb3a1b16619f7ea7404bcbafb5b60 (diff) | |
download | samba-72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591.tar.gz samba-72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591.tar.bz2 samba-72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591.zip |
tdb: Remove "header" from tdb_context
header.hash_size was the only thing we ever referenced outside of
tdb_open_ex and its direct callees. So this shrinks the tdb_context by
164 bytes.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Feb 5 13:18:28 CET 2013 on sn-devel-104
Diffstat (limited to 'lib/tdb/common/lock.c')
-rw-r--r-- | lib/tdb/common/lock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c index b530c6ed5f..dadc69e8cd 100644 --- a/lib/tdb/common/lock.c +++ b/lib/tdb/common/lock.c @@ -259,7 +259,7 @@ int tdb_nest_lock(struct tdb_context *tdb, uint32_t offset, int ltype, { struct tdb_lock_type *new_lck; - if (offset >= lock_offset(tdb->header.hash_size)) { + if (offset >= lock_offset(tdb->hash_size)) { tdb->ecode = TDB_ERR_LOCK; TDB_LOG((tdb, TDB_DEBUG_ERROR,"tdb_lock: invalid offset %u for ltype=%d\n", offset, ltype)); @@ -422,8 +422,8 @@ int tdb_nest_unlock(struct tdb_context *tdb, uint32_t offset, int ltype, return 0; /* Sanity checks */ - if (offset >= lock_offset(tdb->header.hash_size)) { - TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: offset %u invalid (%d)\n", offset, tdb->header.hash_size)); + if (offset >= lock_offset(tdb->hash_size)) { + TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: offset %u invalid (%d)\n", offset, tdb->hash_size)); return ret; } @@ -588,15 +588,15 @@ int tdb_allrecord_lock(struct tdb_context *tdb, int ltype, * It is (1) which cause the starvation problem, so we're only * gradual for that. */ if (tdb_chainlock_gradual(tdb, ltype, flags, FREELIST_TOP, - tdb->header.hash_size * 4) == -1) { + tdb->hash_size * 4) == -1) { return -1; } /* Grab individual record locks. */ - if (tdb_brlock(tdb, ltype, lock_offset(tdb->header.hash_size), 0, + if (tdb_brlock(tdb, ltype, lock_offset(tdb->hash_size), 0, flags) == -1) { tdb_brunlock(tdb, ltype, FREELIST_TOP, - tdb->header.hash_size * 4); + tdb->hash_size * 4); return -1; } |