Commit 38cbcdc0 authored by Jan Blunck's avatar Jan Blunck Committed by Linus Torvalds

[PATCH] fix vmstat per cpu usage

The per cpu variables are used incorrectly in vmstat.h.
Signed-off-by: default avatarJan Blunck <jblunck@suse.de>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Acked-by: default avatarSteve Fox <drfickle@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9f59ce5d
......@@ -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();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment