summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-05 19:33:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-05 19:33:03 -0400
commit091a1eaa0e309b0e8dcbf3f2da12c7f3d03ed182 (patch)
tree69b676d0c91cf4dd22bb5c9e69fc4bd6ded9ab05 /mm/migrate.c
parent5943a9bbbb98b5c957662edd2fc902cc14e65895 (diff)
parentd41aa5252394c065d1f04d1ceea885b70d00c9c6 (diff)
Merge branch 'akpm'
* akpm: mm: madvise(MADV_DODUMP): allow hugetlbfs pages ocfs2: fix locking for res->tracking and dlm->tracking_list mm/vmscan.c: fix int overflow in callers of do_shrink_slab() mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly mm/vmstat.c: fix outdated vmstat_text proc: restrict kernel stack dumps to root mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes mm/migrate.c: split only transparent huge pages when allocation fails ipc/shm.c: use ERR_CAST() for shm_lock() error return mm/gup_benchmark: fix unsigned comparison to zero in __gup_benchmark_ioctl mm, thp: fix mlocking THP page with migration enabled ocfs2: fix crash in ocfs2_duplicate_clusters_by_page() hugetlb: take PMD sharing into account when flushing tlb/caches mm: migration: fix migration of huge PMD shared pages
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 5e285c1249a0..84381b55b2bd 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -275,6 +275,9 @@ static bool remove_migration_pte(struct page *page, struct vm_area_struct *vma,
275 if (vma->vm_flags & VM_LOCKED && !PageTransCompound(new)) 275 if (vma->vm_flags & VM_LOCKED && !PageTransCompound(new))
276 mlock_vma_page(new); 276 mlock_vma_page(new);
277 277
278 if (PageTransHuge(page) && PageMlocked(page))
279 clear_page_mlock(page);
280
278 /* No need to invalidate - it was non-present before */ 281 /* No need to invalidate - it was non-present before */
279 update_mmu_cache(vma, pvmw.address, pvmw.pte); 282 update_mmu_cache(vma, pvmw.address, pvmw.pte);
280 } 283 }
@@ -1411,7 +1414,7 @@ retry:
1411 * we encounter them after the rest of the list 1414 * we encounter them after the rest of the list
1412 * is processed. 1415 * is processed.
1413 */ 1416 */
1414 if (PageTransHuge(page)) { 1417 if (PageTransHuge(page) && !PageHuge(page)) {
1415 lock_page(page); 1418 lock_page(page);
1416 rc = split_huge_page_to_list(page, from); 1419 rc = split_huge_page_to_list(page, from);
1417 unlock_page(page); 1420 unlock_page(page);