diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2009-09-21 20:01:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:30 -0400 |
commit | 74a1c48fb4e9f10e3c83dcd39af73487968e35bf (patch) | |
tree | 8a9facf333d114c9e5b4be37278951b35b21ff2b /mm/vmscan.c | |
parent | 5205e56eeab04ce02f8bb6b47d1569b216bc0b6a (diff) |
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 <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
1208 | SetPageLRU(page); | 1208 | SetPageLRU(page); |
1209 | lru = page_lru(page); | 1209 | lru = page_lru(page); |
1210 | add_page_to_lru_list(zone, page, lru); | 1210 | add_page_to_lru_list(zone, page, lru); |
1211 | if (PageActive(page)) { | 1211 | if (is_active_lru(lru)) { |
1212 | int file = !!page_is_file_cache(page); | 1212 | int file = !!is_file_lru(lru); |
1213 | reclaim_stat->recent_rotated[file]++; | 1213 | reclaim_stat->recent_rotated[file]++; |
1214 | } | 1214 | } |
1215 | if (!pagevec_add(&pvec, page)) { | 1215 | if (!pagevec_add(&pvec, page)) { |