mm/vma: make vma_is_accessible() available for general use
[platform/kernel/linux-rpi.git] / mm / gup.c
index 4a8e969..ba2c6c0 100644 (file)
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1228,7 +1228,7 @@ long populate_vma_page_range(struct vm_area_struct *vma,
         * We want mlock to succeed for regions that have any permissions
         * other than PROT_NONE.
         */
-       if (vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC))
+       if (vma_is_accessible(vma))
                gup_flags |= FOLL_FORCE;
 
        /*