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: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e45b3b6af09dab2a28a7c88b340d0bcdd173e068;p=linux-2.6 [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 3e0daf5413..d673b7b15c 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(); }