]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arch/arm64/kvm: Use vma_lookup() instead of find_vma_intersection()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:28:44 +0000 (14:28 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 6 May 2021 17:25:45 +0000 (13:25 -0400)
vma_lookup() finds the vma of a specific address with a cleaner
interface and is more readable.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
arch/arm64/kvm/mmu.c

index c5d1f3c87dbdb61d9f8dc83e944a26d44dd93b6d..8b112b594e0951fb256a8ddafd448f561fb0d859 100644 (file)
@@ -855,7 +855,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 
        /* Let's check if we will get back a huge page backed by hugetlbfs */
        mmap_read_lock(current->mm);
-       vma = find_vma_intersection(current->mm, hva, hva + 1);
+       vma = vma_lookup(current->mm, hva);
        if (unlikely(!vma)) {
                kvm_err("Failed to find VMA for hva 0x%lx\n", hva);
                mmap_read_unlock(current->mm);