mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
More for ITS#5860
This commit is contained in:
parent
18a269db55
commit
09a369c4ea
1 changed files with 7 additions and 4 deletions
|
|
@ -749,10 +749,13 @@ bdb_cache_lru_purge( struct bdb_info *bdb )
|
|||
if ( islocked )
|
||||
bdb_cache_entryinfo_unlock( elru );
|
||||
|
||||
if ( (unsigned) count >= bdb->bi_cache.c_minfree && bdb->bi_cache.c_leaves <= eimax ) {
|
||||
ldap_pvt_thread_mutex_lock( &bdb->bi_cache.c_count_mutex );
|
||||
bdb->bi_cache.c_cursize -= count;
|
||||
ldap_pvt_thread_mutex_unlock( &bdb->bi_cache.c_count_mutex );
|
||||
if (( bdb->bi_cache.c_cursize < bdb->bi_cache.c_maxsize ||
|
||||
(unsigned) count >= bdb->bi_cache.c_minfree ) && bdb->bi_cache.c_leaves <= eimax ) {
|
||||
if ( count ) {
|
||||
ldap_pvt_thread_mutex_lock( &bdb->bi_cache.c_count_mutex );
|
||||
bdb->bi_cache.c_cursize -= count;
|
||||
ldap_pvt_thread_mutex_unlock( &bdb->bi_cache.c_count_mutex );
|
||||
}
|
||||
break;
|
||||
}
|
||||
bottom:
|
||||
|
|
|
|||
Loading…
Reference in a new issue