From: Howard Chu Date: Wed, 19 Jan 2005 19:18:28 +0000 (+0000) Subject: ITS#3494 fix deadlock X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~326 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eb7deb9eba6594aad2a5b823d19c0c9433c39679;p=openldap ITS#3494 fix deadlock --- diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index f9b452855b..76d6e28c5e 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -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 );