mm/vma: make vma_is_accessible() available for general use
[platform/kernel/linux-rpi.git] / include / linux / mm.h
index 3285dae..c3d032a 100644 (file)
@@ -546,6 +546,12 @@ static inline bool vma_is_anonymous(struct vm_area_struct *vma)
        return !vma->vm_ops;
 }
 
+
+static inline bool vma_is_accessible(struct vm_area_struct *vma)
+{
+       return vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC);
+}
+
 #ifdef CONFIG_SHMEM
 /*
  * The vma_is_shmem is not inline because it is used only by slow