From: KOSAKI Motohiro Date: Tue, 22 Sep 2009 00:01:45 +0000 (-0700) Subject: vmscan: kill unnecessary page flag test X-Git-Tag: Ubuntu-5.0.0-8.9~26145 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=74a1c48fb4e9f10e3c83dcd39af73487968e35bf;p=mirror_ubuntu-disco-kernel.git vmscan: kill unnecessary page flag test The page_lru() already evaluate PageActive() and PageSwapBacked(). We don't need to re-evaluate it. Signed-off-by: KOSAKI Motohiro Reviewed-by: Johannes Weiner Cc: Rik van Riel Cc: Minchan Kim Cc: Mel Gorman Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index ca81d0d05c09..20c5fa8eca46 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1208,8 +1208,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, SetPageLRU(page); lru = page_lru(page); add_page_to_lru_list(zone, page, lru); - if (PageActive(page)) { - int file = !!page_is_file_cache(page); + if (is_active_lru(lru)) { + int file = !!is_file_lru(lru); reclaim_stat->recent_rotated[file]++; } if (!pagevec_add(&pvec, page)) {