diff options
author | Tejun Heo <tj@kernel.org> | 2014-06-28 08:10:13 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-06-28 08:10:13 -0400 |
commit | eae7975ddf031b3084f4a5f7d88f698aefad96fb (patch) | |
tree | 5e5dd384eac28d12ac6ebcf197f92f543bd44c0d /kernel/panic.c | |
parent | d630dc4c9adb41e5bd1e06df2dbeaf622469ddd5 (diff) |
percpu-refcount: add helpers for ->percpu_count accesses
* All four percpu_ref_*() operations implemented in the header file
perform the same operation to determine whether the percpu_ref is
alive and extract the percpu pointer. Factor out the common logic
into __pcpu_ref_alive(). This doesn't change the generated code.
* There are a couple places in percpu-refcount.c which masks out
PCPU_REF_DEAD to obtain the percpu pointer. Factor it out into
pcpu_count_ptr().
* The above changes make the WARN_ON_ONCE() conditional at the top of
percpu_ref_kill_and_confirm() the only user of REF_STATUS(). Test
PCPU_REF_DEAD directly and remove REF_STATUS().
This patch doesn't introduce any functional change.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Kent Overstreet <kmo@daterainc.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Diffstat (limited to 'kernel/panic.c')
0 files changed, 0 insertions, 0 deletions