Messages in this thread Patch in this message | | | Subject | [PATCH 2/3] mm: postpone migrated page mapping reset | From | Konstantin Khlebnikov <> | Date | Fri, 06 Jan 2012 21:38:51 +0400 |
| |
Postpone resetting page->mapping till final remove_migration_ptes(), otherwise expression PageAnon(migration_entry_to_page(entry)) does not work.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> --- mm/migrate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c index 177aca4..f59cd76 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -386,7 +386,6 @@ void migrate_page_copy(struct page *newpage, struct page *page) ClearPageSwapCache(page); ClearPagePrivate(page); set_page_private(page, 0); - page->mapping = NULL; /* * If any waiters have accumulated on the new page then @@ -614,6 +613,7 @@ static int move_to_new_page(struct page *newpage, struct page *page, } else { if (remap_swapcache) remove_migration_ptes(page, newpage); + page->mapping = NULL; } unlock_page(newpage);
| |