From: Huang Shijie Date: Tue, 15 Dec 2009 01:59:48 +0000 (-0800) Subject: vmscan: simplify code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62c0c2f198c1f2ead05c961e83ef486c45888325;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git vmscan: simplify code Simplify the code for shrink_inactive_list(). Signed-off-by: Huang Shijie Reviewed-by: KOSAKI Motohiro Reviewed-by: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index 04658189b9a5..885207a6b6b7 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -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);