summaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot_item.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-06-19 08:41:30 +1000
committerNathan Scott <nathans@sgi.com>2006-06-19 08:41:30 +1000
commit0d8fee3270f8a5e4bf95fbed3e81e21b57f8a5a0 (patch)
treee965874962259a2f16980f19a4e5c03ef635a86f /fs/xfs/quota/xfs_dquot_item.c
parenta805bad5daae8d4f92ce46f467484d4867e996d4 (diff)
downloadop-kernel-dev-0d8fee3270f8a5e4bf95fbed3e81e21b57f8a5a0.zip
op-kernel-dev-0d8fee3270f8a5e4bf95fbed3e81e21b57f8a5a0.tar.gz
[XFS] Kill direct access to ->count in valusema(); all we ever use it for
is check if semaphore is actually locked, which can be trivially done in portable way. Code gets more reabable, while we are at it... SGI-PV: 953915 SGI-Modid: xfs-linux-melb:xfs-kern:26274a Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot_item.c')
-rw-r--r--fs/xfs/quota/xfs_dquot_item.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c
index 546f48a..21ad5a5 100644
--- a/fs/xfs/quota/xfs_dquot_item.c
+++ b/fs/xfs/quota/xfs_dquot_item.c
@@ -248,7 +248,7 @@ xfs_qm_dquot_logitem_pushbuf(
* inode flush completed and the inode was taken off the AIL.
* So, just get out.
*/
- if ((valusema(&(dqp->q_flock)) > 0) ||
+ if (!issemalocked(&(dqp->q_flock)) ||
((qip->qli_item.li_flags & XFS_LI_IN_AIL) == 0)) {
qip->qli_pushbuf_flag = 0;
xfs_dqunlock(dqp);
@@ -261,7 +261,7 @@ xfs_qm_dquot_logitem_pushbuf(
if (bp != NULL) {
if (XFS_BUF_ISDELAYWRITE(bp)) {
dopush = ((qip->qli_item.li_flags & XFS_LI_IN_AIL) &&
- (valusema(&(dqp->q_flock)) <= 0));
+ issemalocked(&(dqp->q_flock)));
qip->qli_pushbuf_flag = 0;
xfs_dqunlock(dqp);
OpenPOWER on IntegriCloud