KVM: MMU: cleanup __kvm_sync_page and its callers
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Feb 2016 09:28:01 +0000 (10:28 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2016 11:33:23 +0000 (12:33 +0100)
commit9a43c5d9c3f13a2fc3864570e33438347319b584
tree502444f1787df86cf5367da4fa2d7010c7dd1e50
parentdf748f864a342375aaa52a7e043fae7142376d01
KVM: MMU: cleanup __kvm_sync_page and its callers

Calling kvm_unlink_unsync_page in the middle of __kvm_sync_page makes
things unnecessarily tricky.  If kvm_mmu_prepare_zap_page is called,
it will call kvm_unlink_unsync_page too.  So kvm_unlink_unsync_page can
be called just as well at the beginning or the end of __kvm_sync_page...
which means that we might do it in kvm_sync_page too and remove the
parameter.

kvm_sync_page ends up being the same code that kvm_sync_pages used
to have before the previous patch.

Reviewed-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c