Skip to content
Snippets Groups Projects
Commit 7c6afdf7 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix giant lock handling on entry release

parent b6de12f5
Branches
Tags
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment