aboutsummaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2013-12-18 20:08:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-12-18 22:04:51 -0500
commit1667918b6483b12a6496bf54151b827b8235d7b1 (patch)
tree05fbf14be003948a074fff97950c7764f6bf9c80 /mm/huge_memory.c
parent3c67f474558748b604e247d92b55dfe89654c81d (diff)
mm: numa: clear numa hinting information on mprotect
On a protection change it is no longer clear if the page should be still accessible. This patch clears the NUMA hinting fault bits on a protection change. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Alex Thorlton <athorlton@sgi.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c2
1 files changed, 2 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));