summaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-08 14:36:19 +0200
committerChristoph Hellwig <hch@lst.de>2011-07-08 14:36:19 +0200
commit0c842ad46a51891ac4420b7285613f4134a65ccd (patch)
treecf82cc7853821a21998114d20b1297b14061eade /fs/xfs/quota/xfs_dquot.c
parentbbb4197c73be356a052dac25cce5ed0c157c6c90 (diff)
downloadop-kernel-dev-0c842ad46a51891ac4420b7285613f4134a65ccd.zip
op-kernel-dev-0c842ad46a51891ac4420b7285613f4134a65ccd.tar.gz
xfs: clean up buffer locking helpers
Rename xfs_buf_cond_lock and reverse it's return value to fit most other trylock operations in the Kernel and XFS (with the exception of down_trylock, after which xfs_buf_cond_lock was modelled), and replace xfs_buf_lock_val with an xfs_buf_islocked for use in asserts, or and opencoded variant in tracing. remove the XFS_BUF_* wrappers for all the locking helpers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r--fs/xfs/quota/xfs_dquot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 6fa2146..dec1149 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -318,7 +318,7 @@ xfs_qm_init_dquot_blk(
ASSERT(tp);
ASSERT(XFS_BUF_ISBUSY(bp));
- ASSERT(XFS_BUF_VALUSEMA(bp) <= 0);
+ ASSERT(xfs_buf_islocked(bp));
d = (xfs_dqblk_t *)XFS_BUF_PTR(bp);
@@ -534,7 +534,7 @@ xfs_qm_dqtobp(
}
ASSERT(XFS_BUF_ISBUSY(bp));
- ASSERT(XFS_BUF_VALUSEMA(bp) <= 0);
+ ASSERT(xfs_buf_islocked(bp));
/*
* calculate the location of the dquot inside the buffer.
@@ -622,7 +622,7 @@ xfs_qm_dqread(
* brelse it because we have the changes incore.
*/
ASSERT(XFS_BUF_ISBUSY(bp));
- ASSERT(XFS_BUF_VALUSEMA(bp) <= 0);
+ ASSERT(xfs_buf_islocked(bp));
xfs_trans_brelse(tp, bp);
return (error);
OpenPOWER on IntegriCloud