Changeset 745 for trunk/server/lib/tdb/common/io.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/lib/tdb/common/io.c
r599 r745 7 7 Copyright (C) Paul `Rusty' Russell 2000 8 8 Copyright (C) Jeremy Allison 2000-2003 9 9 10 10 ** NOTE! The following LGPL license applies to the tdb 11 11 ** library. This does NOT imply that all of Samba is released 12 12 ** under the LGPL 13 13 14 14 This library is free software; you can redistribute it and/or 15 15 modify it under the terms of the GNU Lesser General Public … … 94 94 // the owner (us) is not allowed to write to the file (different from unix) 95 95 TDB_LOG((tdb, TDB_DEBUG_TRACE,"unlocking at %d len=%d before writing.\n", off, len)); 96 tdb_br lock( tdb, off, F_UNLCK, F_SETLK, 0, 1);96 tdb_brunlock( tdb, F_RDLCK, off, len); 97 97 // if a wider previous lock is in effect, we cannot write lock our segment 98 98 // (e.g. a lock_upgrade locks all the file), so we hope the previous lock 99 99 // is a write lock: do not wait for lock. 100 tdb_brlock( tdb, off, F_WRLCK, F_SETLK, 0, len);100 tdb_brlock( tdb, F_WRLCK, off, len, F_SETLK); 101 101 #endif 102 102 … … 126 126 "write %d bytes at %d in two attempts\n", 127 127 len, off)); 128 129 128 #ifdef __OS2__ // remove our lock 130 tdb_br lock( tdb, off, F_UNLCK, F_SETLK, 0, len);129 tdb_brunlock( tdb, F_WRLCK, off, len); 131 130 #endif 132 131 return -1; 133 132 } 134 133 } 135 136 134 #ifdef __OS2__ // remove our lock 137 tdb_brlock( tdb, off, F_UNLCK, F_SETLK, 0, len);135 tdb_brunlock( tdb, F_WRLCK, off, len); 138 136 #endif 139 140 137 return 0; 141 138 } … … 497 494 tdb_oob, 498 495 tdb_expand_file, 499 tdb_brlock500 496 }; 501 497
Note:
See TracChangeset
for help on using the changeset viewer.