summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/mprotect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 6b2403a2f814..8d56d3933283 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -57,8 +57,10 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
ptent = ptep_modify_prot_start(mm, addr, pte);
if (!prot_numa) {
+ pte_t old_ptent = ptent;
ptent = pte_modify(ptent, newprot);
- updated = true;
+ if (ptent != old_ptent)
+ updated = true;
} else {
struct page *page;