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:
Kurt Zeilenga 1999-01-26 05:22:58 +00:00
parent 0181892175
commit 3c67248a65

View file

@ -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 );