vmscan: simplify code
authorHuang Shijie <[email protected]>
Tue, 15 Dec 2009 01:59:48 +0000 (17:59 -0800)
committerLinus Torvalds <[email protected]>
Tue, 15 Dec 2009 16:53:21 +0000 (08:53 -0800)
Simplify the code for shrink_inactive_list().

Signed-off-by: Huang Shijie <[email protected]>
Reviewed-by: KOSAKI Motohiro <[email protected]>
Reviewed-by: Wu Fengguang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmscan.c

index 04658189b9a5c6e70c88e497fc4100a97e355fe1..885207a6b6b735cb7ca0dd276b907312300b5df1 100644 (file)
@@ -1165,10 +1165,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
                __mod_zone_page_state(zone, NR_ISOLATED_ANON, nr_anon);
                __mod_zone_page_state(zone, NR_ISOLATED_FILE, nr_file);
 
-               reclaim_stat->recent_scanned[0] += count[LRU_INACTIVE_ANON];
-               reclaim_stat->recent_scanned[0] += count[LRU_ACTIVE_ANON];
-               reclaim_stat->recent_scanned[1] += count[LRU_INACTIVE_FILE];
-               reclaim_stat->recent_scanned[1] += count[LRU_ACTIVE_FILE];
+               reclaim_stat->recent_scanned[0] += nr_anon;
+               reclaim_stat->recent_scanned[1] += nr_file;
 
                spin_unlock_irq(&zone->lru_lock);