Commit db544983 authored by Lei Yilong's avatar Lei Yilong Committed by guzitao
Browse files

sw64: kvm: use vma_lookup() instead of find_vma_intersection()

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



--------------------------------

vma_lookup() finds the vma of a specific address with a cleaner
interface and is more readable.

Signed-off-by: default avatarLei Yilong <leiyilong@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 7889c0e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1197,7 +1197,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu,

	/* Let's check if we will get back a huge page backed by hugetlbfs */
	down_read(&current->mm->mmap_lock);
	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);
		up_read(&current->mm->mmap_lock);