[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1543972551-60951-1-git-send-email-peng.hao2@zte.com.cn>
Date: Wed, 5 Dec 2018 09:15:51 +0800
From: Peng Hao <peng.hao2@....com.cn>
To: christoffer.dall@....com, marc.zyngier@....com
Cc: linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-kernel@...r.kernel.org, Peng Hao <peng.hao2@....com.cn>
Subject: [PATCH] kvm/arm: return 0 when the number of objects is not less than min
Return 0 when there is enough kvm_mmu_memory_cache object.
Signed-off-by: Peng Hao <peng.hao2@....com.cn>
---
virt/kvm/arm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
index ed162a6..fcda0ce 100644
--- a/virt/kvm/arm/mmu.c
+++ b/virt/kvm/arm/mmu.c
@@ -127,7 +127,7 @@ static int mmu_topup_memory_cache(struct kvm_mmu_memory_cache *cache,
while (cache->nobjs < max) {
page = (void *)__get_free_page(PGALLOC_GFP);
if (!page)
- return -ENOMEM;
+ return cache->nobjs >= min ? 0 : -ENOMEM;
cache->objects[cache->nobjs++] = page;
}
return 0;
--
1.8.3.1
Powered by blists - more mailing lists