diff options
author | Donald Douwsma <donaldd@sgi.com> | 2007-10-11 03:36:05 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 00:44:23 -0500 |
commit | 287f3dad14828275d2517c8696ad118c82b9243f (patch) | |
tree | 4868d40f6c49984ff84f2957d84a3de160d46d7a /fs/xfs/quota/xfs_dquot.c | |
parent | 541d7d3c4b31e2b0ac846fe6d2eb5cdbe1353095 (diff) |
[XFS] Unwrap AIL_LOCK
SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29739a
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index cfdd35ee9f7a..665babcca6a6 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -1209,7 +1209,6 @@ xfs_qm_dqflush( | |||
1209 | xfs_buf_t *bp; | 1209 | xfs_buf_t *bp; |
1210 | xfs_disk_dquot_t *ddqp; | 1210 | xfs_disk_dquot_t *ddqp; |
1211 | int error; | 1211 | int error; |
1212 | SPLDECL(s); | ||
1213 | 1212 | ||
1214 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); | 1213 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); |
1215 | ASSERT(XFS_DQ_IS_FLUSH_LOCKED(dqp)); | 1214 | ASSERT(XFS_DQ_IS_FLUSH_LOCKED(dqp)); |
@@ -1270,9 +1269,9 @@ xfs_qm_dqflush( | |||
1270 | mp = dqp->q_mount; | 1269 | mp = dqp->q_mount; |
1271 | 1270 | ||
1272 | /* lsn is 64 bits */ | 1271 | /* lsn is 64 bits */ |
1273 | AIL_LOCK(mp, s); | 1272 | spin_lock(&mp->m_ail_lock); |
1274 | dqp->q_logitem.qli_flush_lsn = dqp->q_logitem.qli_item.li_lsn; | 1273 | dqp->q_logitem.qli_flush_lsn = dqp->q_logitem.qli_item.li_lsn; |
1275 | AIL_UNLOCK(mp, s); | 1274 | spin_unlock(&mp->m_ail_lock); |
1276 | 1275 | ||
1277 | /* | 1276 | /* |
1278 | * Attach an iodone routine so that we can remove this dquot from the | 1277 | * Attach an iodone routine so that we can remove this dquot from the |
@@ -1318,7 +1317,6 @@ xfs_qm_dqflush_done( | |||
1318 | xfs_dq_logitem_t *qip) | 1317 | xfs_dq_logitem_t *qip) |
1319 | { | 1318 | { |
1320 | xfs_dquot_t *dqp; | 1319 | xfs_dquot_t *dqp; |
1321 | SPLDECL(s); | ||
1322 | 1320 | ||
1323 | dqp = qip->qli_dquot; | 1321 | dqp = qip->qli_dquot; |
1324 | 1322 | ||
@@ -1333,15 +1331,15 @@ xfs_qm_dqflush_done( | |||
1333 | if ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && | 1331 | if ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && |
1334 | qip->qli_item.li_lsn == qip->qli_flush_lsn) { | 1332 | qip->qli_item.li_lsn == qip->qli_flush_lsn) { |
1335 | 1333 | ||
1336 | AIL_LOCK(dqp->q_mount, s); | 1334 | spin_lock(&dqp->q_mount->m_ail_lock); |
1337 | /* | 1335 | /* |
1338 | * xfs_trans_delete_ail() drops the AIL lock. | 1336 | * xfs_trans_delete_ail() drops the AIL lock. |
1339 | */ | 1337 | */ |
1340 | if (qip->qli_item.li_lsn == qip->qli_flush_lsn) | 1338 | if (qip->qli_item.li_lsn == qip->qli_flush_lsn) |
1341 | xfs_trans_delete_ail(dqp->q_mount, | 1339 | xfs_trans_delete_ail(dqp->q_mount, |
1342 | (xfs_log_item_t*)qip, s); | 1340 | (xfs_log_item_t*)qip); |
1343 | else | 1341 | else |
1344 | AIL_UNLOCK(dqp->q_mount, s); | 1342 | spin_unlock(&dqp->q_mount->m_ail_lock); |
1345 | } | 1343 | } |
1346 | 1344 | ||
1347 | /* | 1345 | /* |