From: Liam R. Howlett Date: Mon, 1 Mar 2021 19:30:38 +0000 (-0500) Subject: mm/memory: Use vma_lookup() instead of find_vma_intersection() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=21a4d69e1780610bafce353e730c5a51736802c3;p=users%2Fjedix%2Flinux-maple.git mm/memory: Use vma_lookup() instead of find_vma_intersection() Use the new vma_lookup() call for abstraction & code readability. Signed-off-by: Liam R. Howlett --- diff --git a/mm/memory.c b/mm/memory.c index 4e358601c5d6..3db50ee0b863 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4944,8 +4944,8 @@ int __access_remote_vm(struct mm_struct *mm, unsigned long addr, void *buf, * Check if this is a VM_IO | VM_PFNMAP VMA, which * we can access using slightly different code. */ - vma = find_vma(mm, addr); - if (!vma || vma->vm_start > addr) + vma = vma_lookup(mm, addr); + if (!vma) break; if (vma->vm_ops && vma->vm_ops->access) ret = vma->vm_ops->access(vma, addr, buf,