Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Linux 2.6.39 compat, DEFINE_SPINLOCK()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
behlendorf committed Apr 20, 2011
1 parent 98e2afd commit 83c623a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions module/spl/spl-atomic.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion module/spl/spl-module.c
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion module/spl/spl-vnode.c
Expand Up @@ -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
Expand Down

0 comments on commit 83c623a

Please sign in to comment.