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); diff --git a/module/spl/spl-module.c b/module/spl/spl-module.c index 2c665b5d4..7a626ca71 100644 --- a/module/spl/spl-module.c +++ b/module/spl/spl-module.c @@ -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 * diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 32ae4865d..1af9b2998 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -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