lockref: use cmpxchg64 explicitly for lockless updates
[firefly-linux-kernel-4.4.55.git] / lib / lockref.c
index e2cd2c0a882126c58e04e47102fb4975c5247d3c..677d036cf3c70d6d72b9aa5f108470dd890752cd 100644 (file)
@@ -14,8 +14,8 @@
        while (likely(arch_spin_value_unlocked(old.lock.rlock.raw_lock))) {     \
                struct lockref new = old, prev = old;                           \
                CODE                                                            \
-               old.lock_count = cmpxchg(&lockref->lock_count,                  \
-                                        old.lock_count, new.lock_count);       \
+               old.lock_count = cmpxchg64(&lockref->lock_count,                \
+                                          old.lock_count, new.lock_count);     \
                if (likely(old.lock_count == prev.lock_count)) {                \
                        SUCCESS;                                                \
                }                                                               \