]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/memory.c
mm: replace pmd_write with pmd_access_permitted in fault + gup paths
[linux.git] / mm / memory.c
index 25d283d46ea325c51f42261221abaf50c24c3757..416e451a707e2a8d064d5817cd477191ed945abc 100644 (file)
@@ -4046,7 +4046,7 @@ static int __handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
                        if (pmd_protnone(orig_pmd) && vma_is_accessible(vma))
                                return do_huge_pmd_numa_page(&vmf, orig_pmd);
 
-                       if (dirty && !pmd_write(orig_pmd)) {
+                       if (dirty && !pmd_access_permitted(orig_pmd, WRITE)) {
                                ret = wp_huge_pmd(&vmf, orig_pmd);
                                if (!(ret & VM_FAULT_FALLBACK))
                                        return ret;