diff options
Diffstat (limited to 'virt/kvm/async_pf.c')
-rw-r--r-- | virt/kvm/async_pf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 10df100c4514..06e6401d6ef4 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c | |||
@@ -101,7 +101,7 @@ static void async_pf_execute(struct work_struct *work) | |||
101 | if (waitqueue_active(&vcpu->wq)) | 101 | if (waitqueue_active(&vcpu->wq)) |
102 | wake_up_interruptible(&vcpu->wq); | 102 | wake_up_interruptible(&vcpu->wq); |
103 | 103 | ||
104 | mmdrop(mm); | 104 | mmput(mm); |
105 | kvm_put_kvm(vcpu->kvm); | 105 | kvm_put_kvm(vcpu->kvm); |
106 | } | 106 | } |
107 | 107 | ||
@@ -118,7 +118,7 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu) | |||
118 | flush_work(&work->work); | 118 | flush_work(&work->work); |
119 | #else | 119 | #else |
120 | if (cancel_work_sync(&work->work)) { | 120 | if (cancel_work_sync(&work->work)) { |
121 | mmdrop(work->mm); | 121 | mmput(work->mm); |
122 | kvm_put_kvm(vcpu->kvm); /* == work->vcpu->kvm */ | 122 | kvm_put_kvm(vcpu->kvm); /* == work->vcpu->kvm */ |
123 | kmem_cache_free(async_pf_cache, work); | 123 | kmem_cache_free(async_pf_cache, work); |
124 | } | 124 | } |
@@ -183,7 +183,7 @@ int kvm_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, unsigned long hva, | |||
183 | work->addr = hva; | 183 | work->addr = hva; |
184 | work->arch = *arch; | 184 | work->arch = *arch; |
185 | work->mm = current->mm; | 185 | work->mm = current->mm; |
186 | atomic_inc(&work->mm->mm_count); | 186 | atomic_inc(&work->mm->mm_users); |
187 | kvm_get_kvm(work->vcpu->kvm); | 187 | kvm_get_kvm(work->vcpu->kvm); |
188 | 188 | ||
189 | /* this can't really happen otherwise gfn_to_pfn_async | 189 | /* this can't really happen otherwise gfn_to_pfn_async |
@@ -201,7 +201,7 @@ int kvm_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, unsigned long hva, | |||
201 | return 1; | 201 | return 1; |
202 | retry_sync: | 202 | retry_sync: |
203 | kvm_put_kvm(work->vcpu->kvm); | 203 | kvm_put_kvm(work->vcpu->kvm); |
204 | mmdrop(work->mm); | 204 | mmput(work->mm); |
205 | kmem_cache_free(async_pf_cache, work); | 205 | kmem_cache_free(async_pf_cache, work); |
206 | return 0; | 206 | return 0; |
207 | } | 207 | } |