From: Liam R. Howlett Date: Mon, 1 Mar 2021 19:30:58 +0000 (-0500) Subject: mm/mempolicy: Use vma_lookup() instead of find_vma_intersection() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=44363170bcfdf3a5d719cd4cf2dbd9c96f0dad59;p=users%2Fjedix%2Flinux-maple.git mm/mempolicy: Use vma_lookup() instead of find_vma_intersection() vma_lookup() is more efficient Signed-off-by: Liam R. Howlett --- diff --git a/mm/mempolicy.c b/mm/mempolicy.c index abbef34fe420..b9ad22a963f8 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -968,7 +968,7 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask, * want to return MPOL_DEFAULT in this case. */ mmap_read_lock(mm); - vma = find_vma_intersection(mm, addr, addr+1); + vma = vma_lookup(mm, addr); if (!vma) { mmap_read_unlock(mm); return -EFAULT;