percpu_counter: make APIs irq safe
authorShaohua Li <shli@fusionio.com>
Thu, 24 Oct 2013 08:06:45 +0000 (09:06 +0100)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:38 +0000 (12:54 -0600)
commite68f257a1c10655254c70c7c4e9f89b142297fb6
tree413532d1d3a6405e9d096a73ab88e01f375b16a9
parent73895725a9401bd3454757fcfa7d691270ac7498
percpu_counter: make APIs irq safe

In my usage, sometimes the percpu APIs are called with irq locked,
sometimes not. lockdep complains there is potential deadlock. Let's
always use percpucounter lock in irq safe way. There should be no
performance penality, as all those are slow code path.

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/percpu_counter.c