aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_da_btree.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2007-10-11 17:41:21 +1000
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 16:46:48 +1100
commit703e1f0fd2edc2978bde3b4536e78b577318c090 (patch)
treecb7e227feb32d010f71512fdef3e8ece49e2f99c /fs/xfs/xfs_da_btree.c
parent64137e56d76a5c05aa4411e2f5d7121593dd9478 (diff)
downloadkernel_samsung_smdk4412-703e1f0fd2edc2978bde3b4536e78b577318c090.tar.gz
kernel_samsung_smdk4412-703e1f0fd2edc2978bde3b4536e78b577318c090.tar.bz2
kernel_samsung_smdk4412-703e1f0fd2edc2978bde3b4536e78b577318c090.zip
[XFS] Unwrap xfs_dabuf_global_lock
Un-obfuscate dabuf_global_lock, remove mutex_lock->spin_lock macros, call spin_lock directly, remove extraneous cookie holdover from old xfs code, and change lock type to spinlock_t. SGI-PV: 970382 SGI-Modid: xfs-linux-melb:xfs-kern:29744a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Donald Douwsma <donaldd@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r--fs/xfs/xfs_da_btree.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 26d09e2e1a7..1b446849fb3 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -2218,7 +2218,7 @@ xfs_da_state_free(xfs_da_state_t *state)
#ifdef XFS_DABUF_DEBUG
xfs_dabuf_t *xfs_dabuf_global_list;
-lock_t xfs_dabuf_global_lock;
+spinlock_t xfs_dabuf_global_lock;
#endif
/*
@@ -2264,10 +2264,9 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
}
#ifdef XFS_DABUF_DEBUG
{
- SPLDECL(s);
xfs_dabuf_t *p;
- s = mutex_spinlock(&xfs_dabuf_global_lock);
+ spin_lock(&xfs_dabuf_global_lock);
for (p = xfs_dabuf_global_list; p; p = p->next) {
ASSERT(p->blkno != dabuf->blkno ||
p->target != dabuf->target);
@@ -2277,7 +2276,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
xfs_dabuf_global_list->prev = dabuf;
dabuf->next = xfs_dabuf_global_list;
xfs_dabuf_global_list = dabuf;
- mutex_spinunlock(&xfs_dabuf_global_lock, s);
+ spin_unlock(&xfs_dabuf_global_lock);
}
#endif
return dabuf;
@@ -2319,16 +2318,14 @@ xfs_da_buf_done(xfs_dabuf_t *dabuf)
kmem_free(dabuf->data, BBTOB(dabuf->bbcount));
#ifdef XFS_DABUF_DEBUG
{
- SPLDECL(s);
-
- s = mutex_spinlock(&xfs_dabuf_global_lock);
+ spin_lock(&xfs_dabuf_global_lock);
if (dabuf->prev)
dabuf->prev->next = dabuf->next;
else
xfs_dabuf_global_list = dabuf->next;
if (dabuf->next)
dabuf->next->prev = dabuf->prev;
- mutex_spinunlock(&xfs_dabuf_global_lock, s);
+ spin_unlock(&xfs_dabuf_global_lock);
}
memset(dabuf, 0, XFS_DA_BUF_SIZE(dabuf->nbuf));
#endif