mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit
[sfrench/cifs-2.6.git] / mm / vmscan.c
index 1b8f0e059767715deea0ba16125584ab4aa3ff20..7b4e31eac2cff1bfdb80fe9468df0db23e29336d 100644 (file)
@@ -1516,7 +1516,8 @@ unsigned int reclaim_clean_pages_from_list(struct zone *zone,
        nr_reclaimed = shrink_page_list(&clean_pages, zone->zone_pgdat, &sc,
                        TTU_IGNORE_ACCESS, &stat, true);
        list_splice(&clean_pages, page_list);
-       mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_FILE, -nr_reclaimed);
+       mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_FILE,
+                           -(long)nr_reclaimed);
        /*
         * Since lazyfree pages are isolated from file LRU from the beginning,
         * they will rotate back to anonymous LRU in the end if it failed to
@@ -1526,7 +1527,7 @@ unsigned int reclaim_clean_pages_from_list(struct zone *zone,
        mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_ANON,
                            stat.nr_lazyfree_fail);
        mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_FILE,
-                           -stat.nr_lazyfree_fail);
+                           -(long)stat.nr_lazyfree_fail);
        return nr_reclaimed;
 }