[PATCH] count_vm_events() fix
Dopey bug. Causes hopelessly-wrong numbers from vmstat(8) and several other
counters.
Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 3e0daf5..d673b7b 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -57,7 +57,7 @@
static inline void count_vm_events(enum vm_event_item item, long delta)
{
- get_cpu_var(vm_event_states.event[item])++;
+ get_cpu_var(vm_event_states.event[item]) += delta;
put_cpu();
}