diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-11 21:36:26 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-11 21:36:26 -0500 |
| commit | eedb3d3304b59c64c811522f4ebaaf83124deeac (patch) | |
| tree | 00ede75849525bdc788fc106a1951616bc43c9e0 /include/linux | |
| parent | 9d050966e2eb37a643ac15904b6a8fda7fcfabe9 (diff) | |
| parent | eadac03e898617521f327faf265932b73ecc3e0f (diff) | |
Merge branch 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Pull percpu updates from Tejun Heo:
"Nothing interesting. A patch to convert the remaining __get_cpu_var()
users, another to fix non-critical off-by-one in an assertion and a
cosmetic conversion to lockless_dereference() in percpu-ref.
The back-merge from mainline is to receive lockless_dereference()"
* 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: Replace smp_read_barrier_depends() with lockless_dereference()
percpu: Convert remaining __get_cpu_var uses in 3.18-rcX
percpu: off by one in BUG_ON()
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/percpu-refcount.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index 530b249f7ea4..b4337646388b 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h | |||
| @@ -128,10 +128,8 @@ static inline void percpu_ref_kill(struct percpu_ref *ref) | |||
| 128 | static inline bool __ref_is_percpu(struct percpu_ref *ref, | 128 | static inline bool __ref_is_percpu(struct percpu_ref *ref, |
| 129 | unsigned long __percpu **percpu_countp) | 129 | unsigned long __percpu **percpu_countp) |
| 130 | { | 130 | { |
| 131 | unsigned long percpu_ptr = ACCESS_ONCE(ref->percpu_count_ptr); | ||
| 132 | |||
| 133 | /* paired with smp_store_release() in percpu_ref_reinit() */ | 131 | /* paired with smp_store_release() in percpu_ref_reinit() */ |
| 134 | smp_read_barrier_depends(); | 132 | unsigned long percpu_ptr = lockless_dereference(ref->percpu_count_ptr); |
| 135 | 133 | ||
| 136 | /* | 134 | /* |
| 137 | * Theoretically, the following could test just ATOMIC; however, | 135 | * Theoretically, the following could test just ATOMIC; however, |
