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().
Showing the changes to kernel (1 of 12 files). Show all
Unified · Split
| @@ -2799,7 +2799,7 @@ static void task_numa_work(struct callback_head *work) · 2798 unmodified lines | ||
| 2799 | 2799 | * Skip inaccessible VMAs to avoid any confusion between |
| 2800 | 2800 | * PROT_NONE and NUMA hinting ptes |
| 2801 | 2801 | */ |
| 2802 | − if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))) | |
| 2802 | + if (!vma_is_accessible(vma)) | |
| 2803 | 2803 | continue; |
| 2804 | 2804 | |
| 2805 | 2805 | do { |