asm-generic: make atomic_add_unless a function
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sun, 27 Jun 2010 10:26:06 +0000 (12:26 +0200)
committerArnd Bergmann <arnd@arndb.de>
Sat, 9 Oct 2010 19:36:35 +0000 (21:36 +0200)
commit8b9d40691e8f5e7e0c8fb839c2bad29c5e0888ce
treea4e4cea8af80fa0aa90cb98a9516d3118cc1b51c
parent6b0cd00bc396daf5c2dcf17a8d82055335341f46
asm-generic: make atomic_add_unless a function

atomic_add_unless is a macro so, bad things happen if the caller defines
a local variable named c, just like like the local variable c defined by
the macro. Thus, convert atomic_add_unless to a function. (bug triggered
by net/ipv4/netfilter/ipt_CLUSTERIP.c: clusterip_config_find_get calls
atomic_inc_not_zero)

Signed-off-by: Mathieu Lacage <mathieu.lacage@inria.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/atomic.h