[PATCH] fix vmstat per cpu usage
authorJan Blunck <jblunck@suse.de>
Sat, 5 Aug 2006 19:14:14 +0000 (12:14 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 6 Aug 2006 15:57:47 +0000 (08:57 -0700)
The per cpu variables are used incorrectly in vmstat.h.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Acked-by: Steve Fox <drfickle@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/vmstat.h

index 1ab806c..2d9b1b6 100644 (file)
@@ -41,23 +41,23 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
 
 static inline void __count_vm_event(enum vm_event_item item)
 {
-       __get_cpu_var(vm_event_states.event[item])++;
+       __get_cpu_var(vm_event_states).event[item]++;
 }
 
 static inline void count_vm_event(enum vm_event_item item)
 {
-       get_cpu_var(vm_event_states.event[item])++;
+       get_cpu_var(vm_event_states).event[item]++;
        put_cpu();
 }
 
 static inline void __count_vm_events(enum vm_event_item item, long delta)
 {
-       __get_cpu_var(vm_event_states.event[item]) += delta;
+       __get_cpu_var(vm_event_states).event[item] += delta;
 }
 
 static inline void count_vm_events(enum vm_event_item item, long delta)
 {
-       get_cpu_var(vm_event_states.event[item]) += delta;
+       get_cpu_var(vm_event_states).event[item] += delta;
        put_cpu();
 }