mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Just use read locks on the entry_db_lock
This commit is contained in:
parent
2a14eaf5dd
commit
ddc5c9f735
@ -843,7 +843,7 @@ load1:
|
||||
bdb_cache_entryinfo_unlock( *eip );
|
||||
islocked = 0;
|
||||
}
|
||||
rc = bdb_cache_entry_db_lock( bdb, locker, *eip, load, 0, lock );
|
||||
rc = bdb_cache_entry_db_lock( bdb, locker, *eip, 0, 0, lock );
|
||||
if ( (*eip)->bei_state & CACHE_ENTRY_DELETED ) {
|
||||
rc = DB_NOTFOUND;
|
||||
bdb_cache_entry_db_unlock( bdb, lock );
|
||||
@ -864,11 +864,7 @@ load1:
|
||||
ep = NULL;
|
||||
bdb_cache_lru_link( bdb, *eip );
|
||||
}
|
||||
if ( rc == 0 ) {
|
||||
/* If we succeeded, downgrade back to a readlock. */
|
||||
rc = bdb_cache_entry_db_relock( bdb, locker,
|
||||
*eip, 0, 0, lock );
|
||||
} else {
|
||||
if ( rc ) {
|
||||
/* Otherwise, release the lock. */
|
||||
bdb_cache_entry_db_unlock( bdb, lock );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user