diff options
author | Hugh Dickins <hughd@google.com> | 2012-10-08 19:33:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:55 -0400 |
commit | 39b5f29ac1f988c1615fbc9c69f6651ab0d0c3c7 (patch) | |
tree | d8030f58d542bb3e811d83676b38c5b4b3a16c02 /mm/ksm.c | |
parent | ec4d9f626d5908b6052c2973f37992f1db52e967 (diff) |
mm: remove vma arg from page_evictable
page_evictable(page, vma) is an irritant: almost all its callers pass
NULL for vma. Remove the vma arg and use mlocked_vma_newpage(vma, page)
explicitly in the couple of places it's needed. But in those places we
don't even need page_evictable() itself! They're dealing with a freshly
allocated anonymous page, which has no "mapping" and cannot be mlocked yet.
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michel Lespinasse <walken@google.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1586,7 +1586,7 @@ struct page *ksm_does_need_to_copy(struct page *page, | |||
1586 | SetPageSwapBacked(new_page); | 1586 | SetPageSwapBacked(new_page); |
1587 | __set_page_locked(new_page); | 1587 | __set_page_locked(new_page); |
1588 | 1588 | ||
1589 | if (page_evictable(new_page, vma)) | 1589 | if (!mlocked_vma_newpage(vma, new_page)) |
1590 | lru_cache_add_lru(new_page, LRU_ACTIVE_ANON); | 1590 | lru_cache_add_lru(new_page, LRU_ACTIVE_ANON); |
1591 | else | 1591 | else |
1592 | add_page_to_unevictable_list(new_page); | 1592 | add_page_to_unevictable_list(new_page); |