|
@@ -110,7 +110,7 @@ static inline void percpu_ref_get(struct percpu_ref *ref)
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
|
|
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR))
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR))
|
|
- __this_cpu_inc(*pcpu_count);
|
|
|
|
|
|
+ this_cpu_inc(*pcpu_count);
|
|
else
|
|
else
|
|
atomic_inc(&ref->count);
|
|
atomic_inc(&ref->count);
|
|
|
|
|
|
@@ -136,7 +136,7 @@ static inline bool percpu_ref_tryget(struct percpu_ref *ref)
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
|
|
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) {
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) {
|
|
- __this_cpu_inc(*pcpu_count);
|
|
|
|
|
|
+ this_cpu_inc(*pcpu_count);
|
|
ret = true;
|
|
ret = true;
|
|
} else {
|
|
} else {
|
|
ret = atomic_inc_not_zero(&ref->count);
|
|
ret = atomic_inc_not_zero(&ref->count);
|
|
@@ -171,7 +171,7 @@ static inline bool percpu_ref_tryget_live(struct percpu_ref *ref)
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
|
|
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) {
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) {
|
|
- __this_cpu_inc(*pcpu_count);
|
|
|
|
|
|
+ this_cpu_inc(*pcpu_count);
|
|
ret = true;
|
|
ret = true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -196,7 +196,7 @@ static inline void percpu_ref_put(struct percpu_ref *ref)
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
pcpu_count = ACCESS_ONCE(ref->pcpu_count);
|
|
|
|
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR))
|
|
if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR))
|
|
- __this_cpu_dec(*pcpu_count);
|
|
|
|
|
|
+ this_cpu_dec(*pcpu_count);
|
|
else if (unlikely(atomic_dec_and_test(&ref->count)))
|
|
else if (unlikely(atomic_dec_and_test(&ref->count)))
|
|
ref->release(ref);
|
|
ref->release(ref);
|
|
|
|
|