Merge tag 'v3.8-rc5' into x86/mm
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / mm / pgtable.c
index e27fbf887f3ba2b0fb41595710a9d8d9882aed1f..193350b51f90af74508a8ec97217085bf3acdbab 100644 (file)
@@ -334,7 +334,12 @@ int pmdp_set_access_flags(struct vm_area_struct *vma,
        if (changed && dirty) {
                *pmdp = entry;
                pmd_update_defer(vma->vm_mm, address, pmdp);
-               flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
+               /*
+                * We had a write-protection fault here and changed the pmd
+                * to to more permissive. No need to flush the TLB for that,
+                * #PF is architecturally guaranteed to do that and in the
+                * worst-case we'll generate a spurious fault.
+                */
        }
 
        return changed;