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 12:17:54 -0500 |
commit | 949eb20a1ab73e5da068183e8b05b114206dd555 (patch) | |
tree | e2d2b173fad1d4bf24519fe55f4f6652e35331df /source3/tdb/common/transaction.c | |
parent | b5114650cf63a0e6338da7ac9b5d2fe82ebb057b (diff) | |
download | samba-949eb20a1ab73e5da068183e8b05b114206dd555.tar.gz samba-949eb20a1ab73e5da068183e8b05b114206dd555.tar.bz2 samba-949eb20a1ab73e5da068183e8b05b114206dd555.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 c50f099be1fcae2d533e1c3816cb25c315ba167a)
Diffstat (limited to 'source3/tdb/common/transaction.c')
-rw-r--r-- | source3/tdb/common/transaction.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/tdb/common/transaction.c b/source3/tdb/common/transaction.c index 9f56fb2fd8..24aa5c3223 100644 --- a/source3/tdb/common/transaction.c +++ b/source3/tdb/common/transaction.c @@ -520,12 +520,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; } |