aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/huge_memory.c2
-rw-r--r--mm/mprotect.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index dbafffa5e2ee..70e7429fd8ea 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1532,6 +1532,8 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
1532 ret = 1; 1532 ret = 1;
1533 if (!prot_numa) { 1533 if (!prot_numa) {
1534 entry = pmdp_get_and_clear(mm, addr, pmd); 1534 entry = pmdp_get_and_clear(mm, addr, pmd);
1535 if (pmd_numa(entry))
1536 entry = pmd_mknonnuma(entry);
1535 entry = pmd_modify(entry, newprot); 1537 entry = pmd_modify(entry, newprot);
1536 ret = HPAGE_PMD_NR; 1538 ret = HPAGE_PMD_NR;
1537 BUG_ON(pmd_write(entry)); 1539 BUG_ON(pmd_write(entry));
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 1291a053b167..f8421722acb9 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -54,6 +54,8 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
54 54
55 if (!prot_numa) { 55 if (!prot_numa) {
56 ptent = ptep_modify_prot_start(mm, addr, pte); 56 ptent = ptep_modify_prot_start(mm, addr, pte);
57 if (pte_numa(ptent))
58 ptent = pte_mknonnuma(ptent);
57 ptent = pte_modify(ptent, newprot); 59 ptent = pte_modify(ptent, newprot);
58 updated = true; 60 updated = true;
59 } else { 61 } else {