mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-01 03:19:27 -05:00
cache_set_state( cache, e, 0) cannot occur before lock on parent/root
is released. Some other thread may have cache locked but blocking on parent. Must give up parent lock before acquiring cache lock.
This commit is contained in:
parent
0181892175
commit
3c67248a65
1 changed files with 2 additions and 2 deletions
|
|
@ -221,8 +221,6 @@ ldbm_back_add(
|
|||
rc = 0;
|
||||
|
||||
return_results:;
|
||||
cache_set_state( &li->li_cache, e, 0 );
|
||||
|
||||
if (p != NULL) {
|
||||
/* free parent and writer lock */
|
||||
cache_return_entry_w( &li->li_cache, p );
|
||||
|
|
@ -233,6 +231,8 @@ return_results:;
|
|||
pthread_mutex_unlock(&li->li_root_mutex);
|
||||
}
|
||||
|
||||
cache_set_state( &li->li_cache, e, 0 );
|
||||
|
||||
/* free entry and writer lock */
|
||||
cache_return_entry_w( &li->li_cache, e );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue