* [patch 2/2] KVM: fix vm_stat_get()
@ 2015-11-19 12:41 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-11-19 12:41 UTC (permalink / raw)
To: Gleb Natapov, Janosch Frank; +Cc: Paolo Bonzini, kvm, kernel-janitors
The indenting suggests missing curly braces.
Fixes: 7805f53a85ec ('KVM: Create debugfs dir and stat files for each VM')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f62621f..4740e54 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3576,10 +3576,11 @@ static int vm_stat_get(void *_offset, u64 *val)
*val = 0;
spin_lock(&kvm_lock);
- list_for_each_entry(kvm, &vm_list, vm_list)
+ list_for_each_entry(kvm, &vm_list, vm_list) {
stat_tmp.kvm = kvm;
vm_stat_get_per_vm((void *)&stat_tmp, &tmp_val);
*val += tmp_val;
+ }
spin_unlock(&kvm_lock);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch 2/2] KVM: fix vm_stat_get()
@ 2015-11-19 12:41 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-11-19 12:41 UTC (permalink / raw)
To: Gleb Natapov, Janosch Frank; +Cc: Paolo Bonzini, kvm, kernel-janitors
The indenting suggests missing curly braces.
Fixes: 7805f53a85ec ('KVM: Create debugfs dir and stat files for each VM')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f62621f..4740e54 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3576,10 +3576,11 @@ static int vm_stat_get(void *_offset, u64 *val)
*val = 0;
spin_lock(&kvm_lock);
- list_for_each_entry(kvm, &vm_list, vm_list)
+ list_for_each_entry(kvm, &vm_list, vm_list) {
stat_tmp.kvm = kvm;
vm_stat_get_per_vm((void *)&stat_tmp, &tmp_val);
*val += tmp_val;
+ }
spin_unlock(&kvm_lock);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-19 12:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19 12:41 [patch 2/2] KVM: fix vm_stat_get() Dan Carpenter
2015-11-19 12:41 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.