]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/framge_vector: Use vma_lookup() instead of find_vma_intersection()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:24:29 +0000 (14:24 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:24:29 +0000 (14:24 -0500)
vma_lookup() is more efficient

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

index 10f82d5643b6debb1560759b96d901f2289805b4..55300aabf06de81b457c47b7af0083a43569da7e 100644 (file)
@@ -50,7 +50,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
 
        mmap_read_lock(mm);
        locked = 1;
-       vma = find_vma_intersection(mm, start, start + 1);
+       vma = vma_lookup(mm, start);
        if (!vma) {
                ret = -EFAULT;
                goto out;
@@ -98,7 +98,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
                 */
                if (ret >= nr_frames || start < vma->vm_end)
                        break;
-               vma = find_vma_intersection(mm, start, start + 1);
+               vma = vma_lookup(mm, start);
        } while (vma && vma->vm_flags & (VM_IO | VM_PFNMAP));
 out:
        if (locked)