Changeset 836 for branches/samba-3.5.x/lib/tdb/common/transaction.c
- Timestamp:
- Nov 25, 2013, 6:40:10 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/lib/tdb/common/transaction.c
r657 r836 495 495 /* get a read lock from the freelist to the end of file. This 496 496 is upgraded to a write lock during the commit */ 497 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough.498 497 if (tdb_brlock(tdb, FREELIST_TOP, F_RDLCK, F_SETLKW, 0, 0) == -1) { 499 498 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to get hash locks\n")); … … 501 500 goto fail; 502 501 } 503 #endif504 502 505 503 /* setup a copy of the hash table heads so the hash scan in … … 533 531 534 532 fail: 535 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough.536 533 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0); 537 #endif538 534 tdb_transaction_unlock(tdb); 539 535 SAFE_FREE(tdb->transaction->blocks); … … 636 632 tdb->methods = tdb->transaction->io_methods; 637 633 638 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough639 634 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0); 640 #endif641 635 tdb_transaction_unlock(tdb); 642 636 SAFE_FREE(tdb->transaction->hash_heads); … … 946 940 947 941 /* upgrade the main transaction lock region to a write lock */ 948 #ifndef __OS2__ // YD the global lock is an exclusive lock for us, it is enough949 942 if (tdb_brlock_upgrade(tdb, FREELIST_TOP, 0) == -1) { 950 943 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_prepare_commit: failed to upgrade hash locks\n")); … … 953 946 return -1; 954 947 } 955 #endif956 948 957 949 /* get the global lock - this prevents new users attaching to the database
Note:
See TracChangeset
for help on using the changeset viewer.