diff options
Diffstat (limited to 'include/linux/lockref.h')
-rw-r--r-- | include/linux/lockref.h | 11 |
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 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | 18 | ||
19 | struct lockref { | 19 | struct lockref { |
20 | spinlock_t lock; | 20 | union { |
21 | unsigned int count; | 21 | #ifdef CONFIG_CMPXCHG_LOCKREF |
22 | aligned_u64 lock_count; | ||
23 | #endif | ||
24 | struct { | ||
25 | spinlock_t lock; | ||
26 | unsigned int count; | ||
27 | }; | ||
28 | }; | ||
22 | }; | 29 | }; |
23 | 30 | ||
24 | extern void lockref_get(struct lockref *); | 31 | extern void lockref_get(struct lockref *); |