Ignore:
Timestamp:
Jun 7, 2010, 9:08:40 AM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: changes from 3.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/lib/tdb/common/transaction.c

    r414 r456  
    495495        /* get a read lock from the freelist to the end of file. This
    496496           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.
    497498        if (tdb_brlock(tdb, FREELIST_TOP, F_RDLCK, F_SETLKW, 0, 0) == -1) {
    498499                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to get hash locks\n"));
     
    500501                goto fail;
    501502        }
     503#endif
    502504
    503505        /* setup a copy of the hash table heads so the hash scan in
     
    531533       
    532534fail:
     535#ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough.
    533536        tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0);
     537#endif
    534538        tdb_transaction_unlock(tdb);
    535539        SAFE_FREE(tdb->transaction->blocks);
     
    632636        tdb->methods = tdb->transaction->io_methods;
    633637
     638#ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough
    634639        tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0);
     640#endif
    635641        tdb_transaction_unlock(tdb);
    636642        SAFE_FREE(tdb->transaction->hash_heads);
     
    940946
    941947        /* 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 enough
    942949        if (tdb_brlock_upgrade(tdb, FREELIST_TOP, 0) == -1) {
    943950                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_prepare_commit: failed to upgrade hash locks\n"));
     
    946953                return -1;
    947954        }
     955#endif
    948956
    949957        /* get the global lock - this prevents new users attaching to the database
Note: See TracChangeset for help on using the changeset viewer.