KVM: Simplify ifndef conditional usage in __kvm_set_memory_region()
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Wed, 8 Feb 2012 04:01:09 +0000 (13:01 +0900)
committerAvi Kivity <avi@redhat.com>
Thu, 8 Mar 2012 12:10:21 +0000 (14:10 +0200)
Narrow down the controlled text inside the conditional so that it will
include lpage_info and rmap stuff only.

For this we change the way we check whether the slot is being created
from "if (npages && !new.rmap)" to "if (npages && !old.npages)".

We also stop checking if lpage_info is NULL when we create lpage_info
because we do it from inside the slot creation code block.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

No differences found