From: Andrew Morton Date: Mon, 10 Jul 2006 11:43:50 +0000 (-0700) Subject: [PATCH] count_vm_events() fix X-Git-Tag: v2.6.18-rc2~250 X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e45b3b6af09dab2a28a7c88b340d0bcdd173e068;p=linux-2.6-omap-h63xx.git [PATCH] count_vm_events() fix Dopey bug. Causes hopelessly-wrong numbers from vmstat(8) and several other counters. Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 3e0daf54133..d673b7b15c3 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) 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(); }