virtio-balloon: Remove needless precompiled directive
authorLiang Li <liang.z.li@intel.com>
Tue, 9 Aug 2016 00:30:42 +0000 (08:30 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 9 Oct 2016 22:16:57 +0000 (01:16 +0300)
Since there in wrapper around madvise(), the virtio-balloon
code is able to work without the precompiled directive, the
directive can be removed.

Signed-off-by: Liang Li <liang.z.li@intel.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewd-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-balloon.c

index 49a2f4aade16988322cfecd76aa942fd50fc7a86..eb572e6cdbfe71e9856aa34acba98676ed1f4429 100644 (file)
 
 static void balloon_page(void *addr, int deflate)
 {
-#if defined(__linux__)
     if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
                                          kvm_has_sync_mmu())) {
         qemu_madvise(addr, BALLOON_PAGE_SIZE,
                 deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
     }
-#endif
 }
 
 static const char *balloon_stat_names[] = {