From: Andrew Morton Date: Mon, 10 Jul 2006 11:43:50 +0000 (-0700) Subject: [PATCH] count_vm_events() fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e45b3b6af09dab2a28a7c88b340d0bcdd173e068;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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(); }