diff options
author | Geliang Tang <geliangtang@163.com> | 2016-01-01 19:47:14 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-23 15:40:54 +0100 |
commit | d74c0e6b54c95ace01f05264a22aed99b565fabb (patch) | |
tree | 21f6768b463f82183d293b1f9bbfa4efc30daf8f /arch/x86/kvm/mmu.c | |
parent | 652fc08dae8e01574cd2497d9a76948e5c9d3920 (diff) |
KVM: x86: use list_last_entry
To make the intention clearer, use list_last_entry instead of
list_entry.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 2ce389245bd8..07f4c26a10d3 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2354,8 +2354,8 @@ static bool prepare_zap_oldest_mmu_page(struct kvm *kvm, if (list_empty(&kvm->arch.active_mmu_pages)) return false; - sp = list_entry(kvm->arch.active_mmu_pages.prev, - struct kvm_mmu_page, link); + sp = list_last_entry(&kvm->arch.active_mmu_pages, + struct kvm_mmu_page, link); kvm_mmu_prepare_zap_page(kvm, sp, invalid_list); return true; |