From eb7deb9eba6594aad2a5b823d19c0c9433c39679 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 19 Jan 2005 19:18:28 +0000 Subject: [PATCH] ITS#3494 fix deadlock --- servers/slapd/back-bdb/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ); -- 2.39.5