mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
mm/hugetlb: set PTE as huge in hugetlb_change_protection and remove_migration_pte
When setting a huge PTE, besides calling pte_mkhuge(), we also need to call arch_make_huge_pte(), which we indeed do in make_huge_pte(), but we forget to do in hugetlb_change_protection() and remove_migration_pte(). Signed-off-by: Zhigang Lu <[email protected]> Signed-off-by: Chris Metcalf <[email protected]> Reviewed-by: Michal Hocko <[email protected]> Acked-by: Hillf Danton <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3bdf8cd322
commit
be7517d6ab
2 changed files with 4 additions and 1 deletions
|
|
@ -160,8 +160,10 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma,
|
|||
if (is_write_migration_entry(entry))
|
||||
pte = pte_mkwrite(pte);
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
if (PageHuge(new))
|
||||
if (PageHuge(new)) {
|
||||
pte = pte_mkhuge(pte);
|
||||
pte = arch_make_huge_pte(pte, vma, new, 0);
|
||||
}
|
||||
#endif
|
||||
flush_cache_page(vma, addr, pte_pfn(pte));
|
||||
set_pte_at(mm, addr, ptep, pte);
|
||||
|
|
|
|||
Loading…
Reference in a new issue