Skip to contentSkip to conversation

KVM: fix vm_stat_get()

PATCH In review Dan Carpenter 1 participant 1 message Nov 19, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 KVM: fix vm_stat_get()

The indenting suggests missing curly braces.

Fixes 7805f53a85ec ('KVM: Create debugfs dir and stat files for each VM')
virt/kvm/kvm_main.c +2 -1
index f62621f..4740e54 100644
@@ -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;
 }