Commit 3d56cbdf authored by Jan Kiszka's avatar Jan Kiszka Committed by Avi Kivity

KVM: MMU: Drop unused return value of kvm_mmu_remove_some_alloc_mmu_pages

freed_pages is never evaluated, so remove it as well as the return code
kvm_mmu_remove_some_alloc_mmu_pages so far delivered to its only user.
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 086c9855
...@@ -3890,14 +3890,14 @@ void kvm_mmu_zap_all(struct kvm *kvm) ...@@ -3890,14 +3890,14 @@ void kvm_mmu_zap_all(struct kvm *kvm)
spin_unlock(&kvm->mmu_lock); spin_unlock(&kvm->mmu_lock);
} }
static int kvm_mmu_remove_some_alloc_mmu_pages(struct kvm *kvm, static void kvm_mmu_remove_some_alloc_mmu_pages(struct kvm *kvm,
struct list_head *invalid_list) struct list_head *invalid_list)
{ {
struct kvm_mmu_page *page; struct kvm_mmu_page *page;
page = container_of(kvm->arch.active_mmu_pages.prev, page = container_of(kvm->arch.active_mmu_pages.prev,
struct kvm_mmu_page, link); struct kvm_mmu_page, link);
return kvm_mmu_prepare_zap_page(kvm, page, invalid_list); kvm_mmu_prepare_zap_page(kvm, page, invalid_list);
} }
static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc) static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc)
...@@ -3912,15 +3912,15 @@ static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc) ...@@ -3912,15 +3912,15 @@ static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc)
raw_spin_lock(&kvm_lock); raw_spin_lock(&kvm_lock);
list_for_each_entry(kvm, &vm_list, vm_list) { list_for_each_entry(kvm, &vm_list, vm_list) {
int idx, freed_pages; int idx;
LIST_HEAD(invalid_list); LIST_HEAD(invalid_list);
idx = srcu_read_lock(&kvm->srcu); idx = srcu_read_lock(&kvm->srcu);
spin_lock(&kvm->mmu_lock); spin_lock(&kvm->mmu_lock);
if (!kvm_freed && nr_to_scan > 0 && if (!kvm_freed && nr_to_scan > 0 &&
kvm->arch.n_used_mmu_pages > 0) { kvm->arch.n_used_mmu_pages > 0) {
freed_pages = kvm_mmu_remove_some_alloc_mmu_pages(kvm, kvm_mmu_remove_some_alloc_mmu_pages(kvm,
&invalid_list); &invalid_list);
kvm_freed = kvm; kvm_freed = kvm;
} }
nr_to_scan--; nr_to_scan--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment