]> git.sur5r.net Git - openldap/commitdiff
ITS#5860 more for prev commit
authorHoward Chu <hyc@openldap.org>
Sun, 25 Jan 2009 22:43:31 +0000 (22:43 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 25 Jan 2009 22:43:31 +0000 (22:43 +0000)
servers/slapd/back-bdb/cache.c

index e3fcfae9dc1955b4378056fec34212fccabcba45..89aea40a4edb46e01f2c3a8d778e752001391155 100644 (file)
@@ -719,7 +719,8 @@ bdb_cache_lru_purge( struct bdb_info *bdb )
                        bdb->bi_cache.c_txn, elru, 1, 1, lockp ) == 0 ) {
 
                        /* Free entry for this node if it's present */
-                       if ( elru->bei_e && bdb->bi_cache.c_cursize > bdb->bi_cache.c_maxsize ) {
+                       if ( elru->bei_e && bdb->bi_cache.c_cursize > bdb->bi_cache.c_maxsize &&
+                               count < bdb->bi_cache.c_minfree ) {
                                elru->bei_e->e_private = NULL;
 #ifdef SLAP_ZONE_ALLOC
                                bdb_entry_return( bdb, elru->bei_e, elru->bei_zseq );