On Fri, Nov 6, 2026 at 5:31 AM Lorenzo Stoakes (ARM) <[email protected]> wrote: > > Replace use of the legacy vm_flags_t flags with vma_flags_t values > throughout the GUP logic, both for the MMU and nommu variants. > > No functional change intended. > > Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
Reviewed-by: Barry Song <[email protected]> > --- > mm/gup.c | 45 ++++++++++++++++++++++++--------------------- > 1 file changed, 24 insertions(+), 21 deletions(-) > > @@ -1514,9 +1514,8 @@ static bool vma_permits_fault(struct vm_area_struct > *vma, > { > bool write = !!(fault_flags & FAULT_FLAG_WRITE); > bool foreign = !!(fault_flags & FAULT_FLAG_REMOTE); > - vm_flags_t vm_flags = write ? VM_WRITE : VM_READ; > > - if (!(vm_flags & vma->vm_flags)) > + if (!vma_test(vma, write ? VMA_WRITE_BIT : VMA_READ_BIT)) > return false; This also improves readability. Thanks! >
