summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-04-20 16:05:13 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-04-20 16:05:13 +0200
commit7a258ff04f9d5fe549fed6d03931a0236587047e (patch)
tree6b164332c2a3983d972cc4dc47af3fce6cc5dc32 /mm/migrate.c
parent382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 (diff)
parentf61143c45077df4fa78e2f1ba455a00bbe1d5b8c (diff)
downloadblackbird-obmc-linux-7a258ff04f9d5fe549fed6d03931a0236587047e.tar.gz
blackbird-obmc-linux-7a258ff04f9d5fe549fed6d03931a0236587047e.zip
Merge branch 'linus' into irq/core
Pick up upstream fixes to avoid conflicts with pending patches.
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 9a0897a14d37..ed97c2c14fa8 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -209,8 +209,11 @@ static int remove_migration_pte(struct page *page, struct vm_area_struct *vma,
VM_BUG_ON_PAGE(PageTail(page), page);
while (page_vma_mapped_walk(&pvmw)) {
- new = page - pvmw.page->index +
- linear_page_index(vma, pvmw.address);
+ if (PageKsm(page))
+ new = page;
+ else
+ new = page - pvmw.page->index +
+ linear_page_index(vma, pvmw.address);
get_page(new);
pte = pte_mkold(mk_pte(new, READ_ONCE(vma->vm_page_prot)));
OpenPOWER on IntegriCloud