mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mm: postpone migrated page mapping reset
Postpone resetting page->mapping until the final remove_migration_ptes(). Otherwise the expression PageAnon(migration_entry_to_page(entry)) does not work. Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a1b58c237b
commit
35512ecaef
1 changed files with 1 additions and 1 deletions
|
|
@ -445,7 +445,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
|
||||
|
|
@ -667,6 +666,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue