]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: optimize find_exact_vma() to use vma_lookup()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 14 Apr 2022 06:07:15 +0000 (23:07 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:07:15 +0000 (23:07 -0700)
commitd8ca2b7e2d64ceb6d56cfbc5d20ffa8e7a09341a
tree89eb0c77afec9ea7cd28a597859987e102ab4d35
parentcf06918ef78280db810aeea50a599a6d28262488
mm: optimize find_exact_vma() to use vma_lookup()

Use vma_lookup() to walk the tree to the start value requested.  If the
vma at the start does not match, then the answer is NULL and there is no
need to look at the next vma the way that find_vma() would.

Link: https://lkml.kernel.org/r/20220404143501.2016403-23-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h