History

mm/vma: make vma_is_accessible() available for general use

Lets move vma_is_accessible() helper to include/linux/mm.h which makes it available for general use. While here, this replaces all remaining open encodings for VMA access check with vma_is_accessible().

Anshuman Khandual committed 6 years ago

Commit 3122e801 parent 7e96fb512 files · +17 −18Browse files

Showing the changes to include/linux (1 of 12 files). Show all

Unified · Split

include/linux/mm.h+6−0
@@ -629,6 +629,12 @@ static inline bool vma_is_foreign(struct vm_area_struct *vma) · 628 unmodified lines
629 629
630 return false;630 return false;
631}631}
632
633static inline bool vma_is_accessible(struct vm_area_struct *vma)
634{
635 return vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC);
636}
637
632#ifdef CONFIG_SHMEM638#ifdef CONFIG_SHMEM
633/*639/*
634 * The vma_is_shmem is not inline because it is used only by slow640 * The vma_is_shmem is not inline because it is used only by slow