diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2015-02-24 15:29:25 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2015-03-10 09:37:43 -0400 |
commit | 548ef28449c0c06f92194c40ff0eaed248cb4b75 (patch) | |
tree | 8fd49838e0ffa90b56f7525f1b0332732e9565d7 /virt/kvm/kvm_main.c | |
parent | 0fa9778895635ab3824caf34fd573562dd2b999c (diff) |
KVM: Get rid of kvm_kvfree()
kvm_kvfree() provides exactly the same functionality as the
new common kvfree() function - so let's simply replace the
kvm function with the common function.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b1d6a161eafa..07064dc18f97 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -539,20 +539,12 @@ void *kvm_kvzalloc(unsigned long size) | |||
539 | return kzalloc(size, GFP_KERNEL); | 539 | return kzalloc(size, GFP_KERNEL); |
540 | } | 540 | } |
541 | 541 | ||
542 | void kvm_kvfree(const void *addr) | ||
543 | { | ||
544 | if (is_vmalloc_addr(addr)) | ||
545 | vfree(addr); | ||
546 | else | ||
547 | kfree(addr); | ||
548 | } | ||
549 | |||
550 | static void kvm_destroy_dirty_bitmap(struct kvm_memory_slot *memslot) | 542 | static void kvm_destroy_dirty_bitmap(struct kvm_memory_slot *memslot) |
551 | { | 543 | { |
552 | if (!memslot->dirty_bitmap) | 544 | if (!memslot->dirty_bitmap) |
553 | return; | 545 | return; |
554 | 546 | ||
555 | kvm_kvfree(memslot->dirty_bitmap); | 547 | kvfree(memslot->dirty_bitmap); |
556 | memslot->dirty_bitmap = NULL; | 548 | memslot->dirty_bitmap = NULL; |
557 | } | 549 | } |
558 | 550 | ||