]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/vmscan.c
vmscan: prevent shrinking of active anon lru list in case of no swap space V3
[net-next-2.6.git] / mm / vmscan.c
index 7592d8eb11487d5bd915553b2b74d98c43244114..879d034930c4a3a7ce7bd4b8318990e5422a90f6 100644 (file)
@@ -1570,7 +1570,7 @@ static void shrink_zone(int priority, struct zone *zone,
         * Even if we did not try to evict anon pages at all, we want to
         * rebalance the anon lru active/inactive ratio.
         */
-       if (inactive_anon_is_low(zone, sc))
+       if (inactive_anon_is_low(zone, sc) && nr_swap_pages > 0)
                shrink_active_list(SWAP_CLUSTER_MAX, zone, sc, priority, 0);
 
        throttle_vm_writeout(sc->gfp_mask);