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

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
virt/kvm/kvm_main.c

index 5f260488e999b9331351a325c3b9caa755e0b744..c8048e8e55afa0fda991766c005e1fec57724388 100644 (file)
@@ -1989,7 +1989,7 @@ static kvm_pfn_t hva_to_pfn(unsigned long addr, bool atomic, bool *async,
        }
 
 retry:
-       vma = find_vma_intersection(current->mm, addr, addr + 1);
+       vma = vma_lookup(current->mm, addr);
 
        if (vma == NULL)
                pfn = KVM_PFN_ERR_FAULT;