From: Jan Blunck Date: Sat, 5 Aug 2006 19:14:14 +0000 (-0700) Subject: [PATCH] fix vmstat per cpu usage X-Git-Tag: v2.6.18-rc4~31 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38cbcdc0a7be69a15462dc49512d43353f34b43b;p=linux-2.6 [PATCH] fix vmstat per cpu usage The per cpu variables are used incorrectly in vmstat.h. Signed-off-by: Jan Blunck Cc: Christoph Lameter Acked-by: Steve Fox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 1ab806c475..2d9b1b6079 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -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(); }