summaryrefslogtreecommitdiffstats
path: root/module/spl/spl-atomic.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-04-20 12:01:11 -0700
committerBrian Behlendorf <[email protected]>2011-04-20 12:01:11 -0700
commit83c623aa1a8895879f03f07b060e1c53a9757f71 (patch)
tree9b2dc230e949da13c43c1c60a65b570cfd2c3722 /module/spl/spl-atomic.c
parent98e2afd1c5fc491413a80c7ef005127ac3add5d9 (diff)
Linux 2.6.39 compat, DEFINE_SPINLOCK()
This is a long over due compatibility change. Way, way, way back in 2007 there was a push to remove all consumers of SPIN_LOCK_UNLOCKED. Finally, in 2011 with 2.6.39 all the consumers have been updated and SPIN_LOCK_UNLOCKED was removed. It's about time we use the new API as well, this change does exactly that. DEFINE_SPINLOCK() was available as far back as 2.6.12 so there doesn't need to be any additional autoconf-foo for this change.
Diffstat (limited to 'module/spl/spl-atomic.c')
-rw-r--r--module/spl/spl-atomic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/spl/spl-atomic.c b/module/spl/spl-atomic.c
index f2dd67384..e37b96907 100644
--- a/module/spl/spl-atomic.c
+++ b/module/spl/spl-atomic.c
@@ -34,8 +34,8 @@
#ifdef ATOMIC_SPINLOCK
/* Global atomic lock declarations */
-spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED;
-spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(atomic32_lock);
+DEFINE_SPINLOCK(atomic64_lock);
EXPORT_SYMBOL(atomic32_lock);
EXPORT_SYMBOL(atomic64_lock);