Merge branch 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
[sfrench/cifs-2.6.git] / include / linux / percpu-refcount.h
index 530b249f7ea49faf2b9a252c1f114f6a0a87e365..b4337646388be2cfa76c8a3b1e09c48e29bc1851 100644 (file)
@@ -128,10 +128,8 @@ static inline void percpu_ref_kill(struct percpu_ref *ref)
 static inline bool __ref_is_percpu(struct percpu_ref *ref,
                                          unsigned long __percpu **percpu_countp)
 {
-       unsigned long percpu_ptr = ACCESS_ONCE(ref->percpu_count_ptr);
-
        /* paired with smp_store_release() in percpu_ref_reinit() */
-       smp_read_barrier_depends();
+       unsigned long percpu_ptr = lockless_dereference(ref->percpu_count_ptr);
 
        /*
         * Theoretically, the following could test just ATOMIC; however,