aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swap.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2012-10-08 19:33:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:22:55 -0400
commit39b5f29ac1f988c1615fbc9c69f6651ab0d0c3c7 (patch)
treed8030f58d542bb3e811d83676b38c5b4b3a16c02 /mm/swap.c
parentec4d9f626d5908b6052c2973f37992f1db52e967 (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/swap.c')
-rw-r--r--mm/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c
index f76c76c7501b..6310dc2008ff 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -751,7 +751,7 @@ void lru_add_page_tail(struct page *page, struct page *page_tail,
751 751
752 SetPageLRU(page_tail); 752 SetPageLRU(page_tail);
753 753
754 if (page_evictable(page_tail, NULL)) { 754 if (page_evictable(page_tail)) {
755 if (PageActive(page)) { 755 if (PageActive(page)) {
756 SetPageActive(page_tail); 756 SetPageActive(page_tail);
757 active = 1; 757 active = 1;