aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2019-12-05 11:05:05 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-08 17:33:13 +0100
commitd29c03a58705417561a5d2bacec4194ef6485ece (patch)
tree42b75a4705c9902ae739d9859a034dc516360006 /virt/kvm/kvm_main.c
parentKVM: vmx: remove unreachable statement in vmx_get_msr_feature() (diff)
downloadlinux-dev-d29c03a58705417561a5d2bacec4194ef6485ece.tar.xz
linux-dev-d29c03a58705417561a5d2bacec4194ef6485ece.zip
KVM: get rid of var page in kvm_set_pfn_dirty()
We can get rid of unnecessary var page in kvm_set_pfn_dirty() , thus make code style similar with kvm_set_pfn_accessed(). Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 00268290dcbd..3aa21bec028d 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1931,11 +1931,8 @@ EXPORT_SYMBOL_GPL(kvm_release_pfn_dirty);
void kvm_set_pfn_dirty(kvm_pfn_t pfn)
{
- if (!kvm_is_reserved_pfn(pfn) && !kvm_is_zone_device_pfn(pfn)) {
- struct page *page = pfn_to_page(pfn);
-
- SetPageDirty(page);
- }
+ if (!kvm_is_reserved_pfn(pfn) && !kvm_is_zone_device_pfn(pfn))
+ SetPageDirty(pfn_to_page(pfn));
}
EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty);