arch/powerpc/kvm/book3s_hv_uvmem: use vma_lookup() instead of find_vma_intersection()
authorLiam Howlett <liam.howlett@oracle.com>
Tue, 29 Jun 2021 02:39:02 +0000 (19:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Jun 2021 17:53:51 +0000 (10:53 -0700)
vma_lookup() finds the vma of a specific address with a cleaner interface
and is more readable.

Link: https://lkml.kernel.org/r/20210521174745.2219620-6-Liam.Howlett@Oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/kvm/book3s_hv_uvmem.c

index 84e5a2dc8be53e8b1b521eedcdae268335488367..34720b79588f730715254c6229924b0fa57c32e7 100644 (file)
@@ -614,7 +614,7 @@ void kvmppc_uvmem_drop_pages(const struct kvm_memory_slot *slot,
 
                /* Fetch the VMA if addr is not in the latest fetched one */
                if (!vma || addr >= vma->vm_end) {
-                       vma = find_vma_intersection(kvm->mm, addr, addr+1);
+                       vma = vma_lookup(kvm->mm, addr);
                        if (!vma) {
                                pr_err("Can't find VMA for gfn:0x%lx\n", gfn);
                                break;