percpu-refcount: implement percpu_ref_tryget()
authorTejun Heo <tj@kernel.org>
Fri, 9 May 2014 19:11:53 +0000 (15:11 -0400)
committerTejun Heo <tj@kernel.org>
Fri, 9 May 2014 19:42:35 +0000 (15:42 -0400)
commit4fb6e25049cb6fa0accc7f1b7c192b952fad7ac8
tree6be13f79be6f0bb6dc51ca10431c9737af8aee92
parent2070d50e1cbe3d7f157cbf8e63279c893f375d7f
percpu-refcount: implement percpu_ref_tryget()

Implement percpu_ref_tryget() which fails if the refcnt already
reached zero.  Note that this is different from the recently renamed
percpu_ref_tryget_live() which fails if the refcnt has been killed and
is draining the remaining references.  percpu_ref_tryget() succeeds on
a killed refcnt as long as its current refcnt is above zero.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kent Overstreet <kmo@daterainc.com>
include/linux/percpu-refcount.h