From: Liam R. Howlett Date: Mon, 1 Mar 2021 19:24:29 +0000 (-0500) Subject: mm/framge_vector: Use vma_lookup() instead of find_vma_intersection() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9eba0235e627791c7d859c4d001e8a48a1d0f70b;p=users%2Fjedix%2Flinux-maple.git mm/framge_vector: Use vma_lookup() instead of find_vma_intersection() vma_lookup() is more efficient Signed-off-by: Liam R. Howlett --- diff --git a/mm/frame_vector.c b/mm/frame_vector.c index 10f82d5643b6..55300aabf06d 100644 --- a/mm/frame_vector.c +++ b/mm/frame_vector.c @@ -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)