* [patch] mm: memcontrol: rewrite uncharge API fix - clear page->mapping in migration
@ 2014-07-28 17:10 Johannes Weiner
0 siblings, 0 replies; only message in thread
From: Johannes Weiner @ 2014-07-28 17:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: Michal Hocko, Hugh Dickins, linux-mm, linux-kernel
The page->mapping reset in migration was conditionalized so that a
later uncharge could use PageAnon() to figure out the page type. But
after "mm: memcontrol: rewrite uncharge API fix - double migration",
the old page is uncharged directly in mem_cgroup_migrate() and so this
is no longer necessary.
Once all fixups are folded into the "rewrite uncharge API" patch,
there will be no reason and no explanation for this change anymore, so
revert it.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
mm/migrate.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 7f5a42403fae..5a46f1ec5f43 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -778,14 +778,12 @@ static int move_to_new_page(struct page *newpage, struct page *page,
rc = fallback_migrate_page(mapping, newpage, page, mode);
if (rc != MIGRATEPAGE_SUCCESS) {
- if (!PageAnon(newpage))
- newpage->mapping = NULL;
+ newpage->mapping = NULL;
} else {
mem_cgroup_migrate(page, newpage, false);
if (remap_swapcache)
remove_migration_ptes(page, newpage);
- if (!PageAnon(page))
- page->mapping = NULL;
+ page->mapping = NULL;
}
unlock_page(newpage);
--
2.0.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-28 17:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-28 17:10 [patch] mm: memcontrol: rewrite uncharge API fix - clear page->mapping in migration Johannes Weiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox