diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-02-12 23:16:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:06 -0500 |
commit | 2acd8a9b3e1bd3885c5865e4b44ac3b4d92655d3 (patch) | |
tree | 9069bf607da93d19ec8608dd0d1dd41f154ce0ea /source4/lib/tdb/common/transaction.c | |
parent | 4126b34e1f34a67b1eed06329530c17dfa54fb00 (diff) | |
download | samba-2acd8a9b3e1bd3885c5865e4b44ac3b4d92655d3.tar.gz samba-2acd8a9b3e1bd3885c5865e4b44ac3b4d92655d3.tar.bz2 samba-2acd8a9b3e1bd3885c5865e4b44ac3b4d92655d3.zip |
r21303: As discussed on samba-technical: Change the static array for the in-memory
mirrors of the hash chain locks to a dynamically allocated one.
Jeremy, I count on you to revert it if the build farm freaks out, it's after
midnight here :-)
Volker
(This used to be commit 7b5db2e472c7e27231fa432d3930789e708abd09)
Diffstat (limited to 'source4/lib/tdb/common/transaction.c')
-rw-r--r-- | source4/lib/tdb/common/transaction.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/lib/tdb/common/transaction.c b/source4/lib/tdb/common/transaction.c index 7dff9a95e3..5c94eb0afe 100644 --- a/source4/lib/tdb/common/transaction.c +++ b/source4/lib/tdb/common/transaction.c @@ -516,12 +516,10 @@ int tdb_transaction_cancel(struct tdb_context *tdb) /* remove any locks created during the transaction */ if (tdb->num_locks != 0) { - int h; - for (h=0;h<tdb->header.hash_size+1;h++) { - if (tdb->locked[h].count != 0) { - tdb_brlock(tdb,FREELIST_TOP+4*h,F_UNLCK,F_SETLKW, 0, 1); - tdb->locked[h].count = 0; - } + int i; + for (i=0;i<tdb->num_lockrecs;i++) { + tdb_brlock(tdb,FREELIST_TOP+4*tdb->lockrecs[i].list, + F_UNLCK,F_SETLKW, 0, 1); } tdb->num_locks = 0; } |