]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/memory: Use vma_lookup() instead of find_vma_intersection()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:30:38 +0000 (14:30 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 15 Apr 2021 14:37:32 +0000 (10:37 -0400)
Use the new vma_lookup() call for abstraction & code readability.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/memory.c

index 4e358601c5d601204368bdfd1aea0ff5e19131e2..3db50ee0b86347041c99045f5b3136bba2457547 100644 (file)
@@ -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,