mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Fix giant lock handling on entry release
This commit is contained in:
parent
b6de12f552
commit
7c6afdf7d1
@ -375,12 +375,14 @@ return_results:;
|
||||
}
|
||||
|
||||
if ( rc ) {
|
||||
/* in case of error, writer lock is freed
|
||||
* and entry's private data is destroyed */
|
||||
/*
|
||||
* in case of error, writer lock is freed
|
||||
* and entry's private data is destroyed.
|
||||
* otherwise, this is done when entry is released
|
||||
*/
|
||||
cache_return_entry_w( &li->li_cache, e );
|
||||
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
|
||||
}
|
||||
|
||||
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
@ -31,6 +31,11 @@ ldbm_back_entry_release_rw(
|
||||
if ( slapMode == SLAP_SERVER_MODE ) {
|
||||
/* free entry and reader or writer lock */
|
||||
cache_return_entry_rw( &li->li_cache, e, rw );
|
||||
if( rw ) {
|
||||
ldap_pvt_thread_rdwr_wunlock( &li->li_giant_rwlock );
|
||||
} else {
|
||||
ldap_pvt_thread_rdwr_runlock( &li->li_giant_rwlock );
|
||||
}
|
||||
|
||||
} else {
|
||||
entry_free( e );
|
||||
|
Loading…
Reference in New Issue
Block a user