]> git.sur5r.net Git - openldap/commitdiff
One more tweak for #5860
authorHoward Chu <hyc@openldap.org>
Thu, 19 Mar 2009 06:06:37 +0000 (06:06 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 19 Mar 2009 06:06:37 +0000 (06:06 +0000)
servers/slapd/back-bdb/cache.c

index 66071dccc7c0d180b40862e7584d3898a96a9a6b..e54408d65965515fb1edfc7cc499b294d8cf26f0 100644 (file)
@@ -677,8 +677,8 @@ bdb_cache_lru_purge( struct bdb_info *bdb )
        efree = bdb->bi_cache.c_cursize - bdb->bi_cache.c_maxsize;
        if ( efree < 1 )
                efree = 0;
-       else if (efree < bdb->bi_cache.c_minfree )
-               efree = bdb->bi_cache.c_minfree;
+       else 
+               efree += bdb->bi_cache.c_minfree;
 
        if ( bdb->bi_cache.c_leaves > eimax ) {
                eifree = bdb->bi_cache.c_minfree * 10;