aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-08 08:36:19 -0400
committerChristoph Hellwig <hch@lst.de>2011-07-08 08:36:19 -0400
commit0c842ad46a51891ac4420b7285613f4134a65ccd (patch)
treecf82cc7853821a21998114d20b1297b14061eade /fs/xfs/quota/xfs_dquot.c
parentbbb4197c73be356a052dac25cce5ed0c157c6c90 (diff)
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 6fa214603819..dec11497a2ef 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -318,7 +318,7 @@ xfs_qm_init_dquot_blk(
318 318
319 ASSERT(tp); 319 ASSERT(tp);
320 ASSERT(XFS_BUF_ISBUSY(bp)); 320 ASSERT(XFS_BUF_ISBUSY(bp));
321 ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); 321 ASSERT(xfs_buf_islocked(bp));
322 322
323 d = (xfs_dqblk_t *)XFS_BUF_PTR(bp); 323 d = (xfs_dqblk_t *)XFS_BUF_PTR(bp);
324 324
@@ -534,7 +534,7 @@ xfs_qm_dqtobp(
534 } 534 }
535 535
536 ASSERT(XFS_BUF_ISBUSY(bp)); 536 ASSERT(XFS_BUF_ISBUSY(bp));
537 ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); 537 ASSERT(xfs_buf_islocked(bp));
538 538
539 /* 539 /*
540 * calculate the location of the dquot inside the buffer. 540 * calculate the location of the dquot inside the buffer.
@@ -622,7 +622,7 @@ xfs_qm_dqread(
622 * brelse it because we have the changes incore. 622 * brelse it because we have the changes incore.
623 */ 623 */
624 ASSERT(XFS_BUF_ISBUSY(bp)); 624 ASSERT(XFS_BUF_ISBUSY(bp));
625 ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); 625 ASSERT(xfs_buf_islocked(bp));
626 xfs_trans_brelse(tp, bp); 626 xfs_trans_brelse(tp, bp);
627 627
628 return (error); 628 return (error);