From 7f2f9c4b30fc9d405c8ea633d63d021473ffa516 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 18 Mar 2009 09:44:20 +0000 Subject: [PATCH] Cleanup prev commit --- servers/slapd/back-bdb/cache.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index b6dbaa651f..e248ec0fe0 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -1024,16 +1024,17 @@ load1: if ( bdb->bi_cache.c_cursize > bdb->bi_cache.c_maxsize || bdb->bi_cache.c_leaves > bdb->bi_cache.c_eimax ) { ldap_pvt_thread_mutex_lock( &bdb->bi_cache.c_count_mutex ); - if ( !( flag & ID_NOCACHE )) { - bdb->bi_cache.c_cursize++; - if ( bdb->bi_cache.c_cursize > bdb->bi_cache.c_maxsize && - !bdb->bi_cache.c_purging ) { + if ( !bdb->bi_cache.c_purging ) { + if ( !( flag & ID_NOCACHE )) { + bdb->bi_cache.c_cursize++; + if ( bdb->bi_cache.c_cursize > bdb->bi_cache.c_maxsize ) { + purge = 1; + bdb->bi_cache.c_purging = 1; + } + } else if ( bdb->bi_cache.c_leaves > bdb->bi_cache.c_eimax ) { purge = 1; bdb->bi_cache.c_purging = 1; } - } else if ( bdb->bi_cache.c_leaves > bdb->bi_cache.c_eimax && !bdb->bi_cache.c_purging ) { - purge = 1; - bdb->bi_cache.c_purging = 1; } ldap_pvt_thread_mutex_unlock( &bdb->bi_cache.c_count_mutex ); } -- 2.39.5