ITS#3494 fix deadlock

This commit is contained in:
Howard Chu 2005-01-19 19:18:28 +00:00
parent 5f178fd3d1
commit eb7deb9eba

View file

@ -919,11 +919,12 @@ bdb_cache_add(
}
bdb_cache_entryinfo_unlock( eip );
/* set lru mutex */
ldap_pvt_thread_mutex_lock( &bdb->bi_cache.lru_mutex );
++bdb->bi_cache.c_cursize;
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_cache.c_rwlock );
/* set lru mutex */
ldap_pvt_thread_mutex_lock( &bdb->bi_cache.lru_mutex );
/* lru_mutex is unlocked for us */
bdb_cache_lru_add( bdb, locker, new );