summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorLiam Howlett <liam.howlett@oracle.com>2021-06-28 19:39:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-06-29 10:53:51 -0700
commitfc98c03ba9ea970c6b346a6fe57f98c16a3971da (patch)
tree1fd11e6469dfd17e9ebe165d70689589093498d1 /virt
parent9ce2c3fc0be6e7d0bb2236a33bbb7a0f1943bd81 (diff)
downloadlinux-fc98c03ba9ea970c6b346a6fe57f98c16a3971da.tar.bz2
virt/kvm: use vma_lookup() instead of find_vma_intersection()
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-11-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>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 46fb042837d2..732bfaf252bd 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2170,7 +2170,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;