]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: numa: handle side-effects in count_vm_numa_events() for !CONFIG_NUMA_BALANCING
authorMel Gorman <mgorman@suse.de>
Wed, 20 Feb 2013 02:14:37 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:44 +0000 (16:52 +1100)
commit3b6bf9f077a777cc3da464d7c0db9f45aa366b5b
treedf4821d8e7d93b66b4618fb2bb7a7d869adab784
parent4e089822144dcdfdb02edbbc85b72f1e135cc7ed
mm: numa: handle side-effects in count_vm_numa_events() for !CONFIG_NUMA_BALANCING

The current definitions for count_vm_numa_events() is wrong for
!CONFIG_NUMA_BALANCING as the following would miss the side-effect.

count_vm_numa_events(NUMA_FOO, bar++);

There are no such users of count_vm_numa_events() but this patch fixes it
as it is a potential pitfall.  Ideally both would be converted to static
inline but NUMA_PTE_UPDATES is not defined if !CONFIG_NUMA_BALANCING and
creating dummy constants just to have a static inline would be similarly
clumsy.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Simon Jeons <simon.jeons@gmail.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/vmstat.h