kvm: remove unnecessary PageReserved check
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 5 Aug 2019 09:11:08 +0000 (11:11 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 9 Aug 2019 14:49:58 +0000 (16:49 +0200)
The same check is already done in kvm_is_reserved_pfn.

Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c

index 4feceaa03fb1dcdb387c6297f66d43406e485b44..c6a91b044d8d62d00a259590927b83d58b853394 100644 (file)
@@ -1855,8 +1855,7 @@ void kvm_set_pfn_dirty(kvm_pfn_t pfn)
        if (!kvm_is_reserved_pfn(pfn)) {
                struct page *page = pfn_to_page(pfn);
 
-               if (!PageReserved(page))
-                       SetPageDirty(page);
+               SetPageDirty(page);
        }
 }
 EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty);