Skip to content

Commit

Permalink
percpu: fix __this_cpu_{sub,inc,dec}_return() definition
Browse files Browse the repository at this point in the history
This patch adds missed "__" prefixes, otherwise these functions
works as irq/preemption safe.

Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Konstantin Khlebnikov authored and Tejun Heo committed Mar 4, 2012
1 parent e920d59 commit adb7950
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ do { \
__pcpu_size_call_return2(__this_cpu_add_return_, pcp, val)
#endif

#define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val))
#define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1)
#define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1)
#define __this_cpu_sub_return(pcp, val) __this_cpu_add_return(pcp, -(val))
#define __this_cpu_inc_return(pcp) __this_cpu_add_return(pcp, 1)
#define __this_cpu_dec_return(pcp) __this_cpu_add_return(pcp, -1)

#define __this_cpu_generic_xchg(pcp, nval) \
({ typeof(pcp) ret__; \
Expand Down

0 comments on commit adb7950

Please sign in to comment.