aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/percpu-refcount.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-10-09 13:20:44 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-12-04 13:52:53 -0500
commitb393e8b33efd2ee08576ceddc10c2b4bfb3b5435 (patch)
tree1e0f9f3aa01484a8c815812f14e0f5a4c6890526 /include/linux/percpu-refcount.h
parent7088efa9137a15d7d21e3abce73e40c9c8a18d68 (diff)
percpu: READ_ONCE() now implies smp_read_barrier_depends()
Because READ_ONCE() now implies smp_read_barrier_depends(), this commit removes the now-redundant smp_read_barrier_depends() following the READ_ONCE() in __ref_is_percpu(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Cc: Christoph Lameter <cl@linux.com>
Diffstat (limited to 'include/linux/percpu-refcount.h')
-rw-r--r--include/linux/percpu-refcount.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index 6658d9ee5257..864d167a1073 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -139,12 +139,12 @@ static inline bool __ref_is_percpu(struct percpu_ref *ref,
139 * when using it as a pointer, __PERCPU_REF_ATOMIC may be set in 139 * when using it as a pointer, __PERCPU_REF_ATOMIC may be set in
140 * between contaminating the pointer value, meaning that 140 * between contaminating the pointer value, meaning that
141 * READ_ONCE() is required when fetching it. 141 * READ_ONCE() is required when fetching it.
142 *
143 * The smp_read_barrier_depends() implied by READ_ONCE() pairs
144 * with smp_store_release() in __percpu_ref_switch_to_percpu().
142 */ 145 */
143 percpu_ptr = READ_ONCE(ref->percpu_count_ptr); 146 percpu_ptr = READ_ONCE(ref->percpu_count_ptr);
144 147
145 /* paired with smp_store_release() in __percpu_ref_switch_to_percpu() */
146 smp_read_barrier_depends();
147
148 /* 148 /*
149 * Theoretically, the following could test just ATOMIC; however, 149 * Theoretically, the following could test just ATOMIC; however,
150 * then we'd have to mask off DEAD separately as DEAD may be 150 * then we'd have to mask off DEAD separately as DEAD may be