]> Pileus Git - ~andy/linux/blobdiff - mm/huge_memory.c
mm: numa: clear numa hinting information on mprotect
[~andy/linux] / mm / huge_memory.c
index dbafffa5e2eeb3b0fdc65cce4f810398fa79de88..70e7429fd8ea81eca9c9eab3c1277f69ee0c7cbe 100644 (file)
@@ -1532,6 +1532,8 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
                ret = 1;
                if (!prot_numa) {
                        entry = pmdp_get_and_clear(mm, addr, pmd);
+                       if (pmd_numa(entry))
+                               entry = pmd_mknonnuma(entry);
                        entry = pmd_modify(entry, newprot);
                        ret = HPAGE_PMD_NR;
                        BUG_ON(pmd_write(entry));