Changeset 830


Ignore:
Timestamp:
Nov 13, 2013, 4:36:13 PM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.6: changed locking code

File:
1 edited

Legend:

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

    r828 r830  
    258258#ifdef __OS2__
    259259        int rc = 0;
    260         if (off == FREELIST_TOP && len == 0) { //unlock complete tdb file
     260        rc = fcntl_lock(tdb, F_UNLCK, off, len, 1);
     261        // if the first unlock doesn't work and it's a complete unlock,
     262        // we split it in 2 parts. first hash size*4 and then the rest
     263        // as it was locked that way as well. and it seems fcntl() doesn't care
     264        if (rc != 0 && off == FREELIST_TOP && len == 0) {
    261265                rc = fcntl_lock(tdb, F_UNLCK, off, tdb->header.hash_size *4, 1);
    262266                if (rc == 0)
    263267                        rc = fcntl_lock(tdb, F_UNLCK, (off + tdb->header.hash_size *4), len, 1);
    264         } else {
    265                 rc = fcntl_lock(tdb, F_UNLCK, off, len, 1);
    266268        }
    267269        return rc;
Note: See TracChangeset for help on using the changeset viewer.