diff options
-rw-r--r-- | mm/hugetlb.c | 1 | ||||
-rw-r--r-- | mm/migrate.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 4f3ea0b1e57c..546db81820e4 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -3033,6 +3033,7 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma, | |||
3033 | if (!huge_pte_none(huge_ptep_get(ptep))) { | 3033 | if (!huge_pte_none(huge_ptep_get(ptep))) { |
3034 | pte = huge_ptep_get_and_clear(mm, address, ptep); | 3034 | pte = huge_ptep_get_and_clear(mm, address, ptep); |
3035 | pte = pte_mkhuge(pte_modify(pte, newprot)); | 3035 | pte = pte_mkhuge(pte_modify(pte, newprot)); |
3036 | pte = arch_make_huge_pte(pte, vma, NULL, 0); | ||
3036 | set_huge_pte_at(mm, address, ptep, pte); | 3037 | set_huge_pte_at(mm, address, ptep, pte); |
3037 | pages++; | 3038 | pages++; |
3038 | } | 3039 | } |
diff --git a/mm/migrate.c b/mm/migrate.c index c38778610aa8..2fd8b4af4744 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -160,8 +160,10 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma, | |||
160 | if (is_write_migration_entry(entry)) | 160 | if (is_write_migration_entry(entry)) |
161 | pte = pte_mkwrite(pte); | 161 | pte = pte_mkwrite(pte); |
162 | #ifdef CONFIG_HUGETLB_PAGE | 162 | #ifdef CONFIG_HUGETLB_PAGE |
163 | if (PageHuge(new)) | 163 | if (PageHuge(new)) { |
164 | pte = pte_mkhuge(pte); | 164 | pte = pte_mkhuge(pte); |
165 | pte = arch_make_huge_pte(pte, vma, new, 0); | ||
166 | } | ||
165 | #endif | 167 | #endif |
166 | flush_cache_page(vma, addr, pte_pfn(pte)); | 168 | flush_cache_page(vma, addr, pte_pfn(pte)); |
167 | set_pte_at(mm, addr, ptep, pte); | 169 | set_pte_at(mm, addr, ptep, pte); |