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@kernel.dk>
Fri, 25 Oct 2013 10:55:59 +0000 (11:55 +0100)
commit098faf5805c80f951ce5e8b4a6842382ad793c38
tree7479b126910fc14f0b1690b9414c8bf9033dce70
parent71fe07d040626de7b72244bf6de889c2e0f5aea3
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