diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-08-03 03:42:52 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-06 09:04:58 -0400 |
commit | 32cad84f44d186654492f1a50a1424c8906ccbd9 (patch) | |
tree | 8a5e7d77edac00a763d3e48aa4d7bf296e671e2b /virt | |
parent | cb9aaa30b133574b646d9d4766ef08a843211393 (diff) |
KVM: do not release the error page
After commit a2766325cf9f9, the error page is replaced by the
error code, it need not be released anymore
[ The patch has been compiling tested for powerpc ]
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/async_pf.c | 4 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 56f553391896..ea475cd03511 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c | |||
@@ -111,7 +111,7 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu) | |||
111 | list_entry(vcpu->async_pf.done.next, | 111 | list_entry(vcpu->async_pf.done.next, |
112 | typeof(*work), link); | 112 | typeof(*work), link); |
113 | list_del(&work->link); | 113 | list_del(&work->link); |
114 | if (work->page) | 114 | if (!is_error_page(work->page)) |
115 | kvm_release_page_clean(work->page); | 115 | kvm_release_page_clean(work->page); |
116 | kmem_cache_free(async_pf_cache, work); | 116 | kmem_cache_free(async_pf_cache, work); |
117 | } | 117 | } |
@@ -138,7 +138,7 @@ void kvm_check_async_pf_completion(struct kvm_vcpu *vcpu) | |||
138 | 138 | ||
139 | list_del(&work->queue); | 139 | list_del(&work->queue); |
140 | vcpu->async_pf.queued--; | 140 | vcpu->async_pf.queued--; |
141 | if (work->page) | 141 | if (!is_error_page(work->page)) |
142 | kvm_release_page_clean(work->page); | 142 | kvm_release_page_clean(work->page); |
143 | kmem_cache_free(async_pf_cache, work); | 143 | kmem_cache_free(async_pf_cache, work); |
144 | } | 144 | } |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index eafba99d1070..a2e85af847c1 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1186,8 +1186,9 @@ EXPORT_SYMBOL_GPL(gfn_to_page); | |||
1186 | 1186 | ||
1187 | void kvm_release_page_clean(struct page *page) | 1187 | void kvm_release_page_clean(struct page *page) |
1188 | { | 1188 | { |
1189 | if (!is_error_page(page)) | 1189 | WARN_ON(is_error_page(page)); |
1190 | kvm_release_pfn_clean(page_to_pfn(page)); | 1190 | |
1191 | kvm_release_pfn_clean(page_to_pfn(page)); | ||
1191 | } | 1192 | } |
1192 | EXPORT_SYMBOL_GPL(kvm_release_page_clean); | 1193 | EXPORT_SYMBOL_GPL(kvm_release_page_clean); |
1193 | 1194 | ||