]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Linux 2.6.39 compat, DEFINE_SPINLOCK()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Apr 2011 19:01:11 +0000 (12:01 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Apr 2011 19:01:11 +0000 (12:01 -0700)
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.

module/spl/spl-atomic.c
module/spl/spl-module.c
module/spl/spl-vnode.c

index f2dd6738437c7b41f037b59c117f5361b5a1bf3e..e37b9690737113763baeea83108b6cdf79fb9535 100644 (file)
@@ -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);
index 2c665b5d40fd8accbeaaa7f407e831f5b424ed2f..7a626ca713433fabb3ab0cbd13647e0c5bd18cdf 100644 (file)
@@ -33,7 +33,7 @@
 
 #define SS_DEBUG_SUBSYS SS_MODULE
 
-static spinlock_t dev_info_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dev_info_lock);
 static LIST_HEAD(dev_info_list);
 
 static struct dev_info *
index 32ae4865d887723ae1c0111a26e4c70b32e761be..1af9b29980d14e49aca2820aeedb17f2791a745a 100644 (file)
@@ -39,7 +39,7 @@ EXPORT_SYMBOL(rootdir);
 static spl_kmem_cache_t *vn_cache;
 static spl_kmem_cache_t *vn_file_cache;
 
-static spinlock_t vn_file_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(vn_file_lock);
 static LIST_HEAD(vn_file_list);
 
 vtype_t