summaryrefslogtreecommitdiffstats
path: root/include/linux/lockref.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lockref.h')
-rw-r--r--include/linux/lockref.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/lockref.h b/include/linux/lockref.h
index 4c0af31c8d47..ca07b5028b01 100644
--- a/include/linux/lockref.h
+++ b/include/linux/lockref.h
@@ -17,8 +17,15 @@
#include <linux/spinlock.h>
struct lockref {
- spinlock_t lock;
- unsigned int count;
+ union {
+#ifdef CONFIG_CMPXCHG_LOCKREF
+ aligned_u64 lock_count;
+#endif
+ struct {
+ spinlock_t lock;
+ unsigned int count;
+ };
+ };
};
extern void lockref_get(struct lockref *);