aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-10-30 02:39:58 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 02:39:58 -0400
commit783a2f656f9674c31d4019708a94af93fa1d1c22 (patch)
tree7ac2123b187c0522dbd8a0d94de3856b33147c46 /fs/xfs/quota
parentfc1829f34d30899701dfd5890030d39e13e1f47d (diff)
[XFS] Finish removing the mount pointer from the AIL API
Change all the remaining AIL API functions that are passed struct xfs_mount pointers to pass pointers directly to the struct xfs_ail being used. With this conversion, all external access to the AIL is via the struct xfs_ail. Hence the operation and referencing of the AIL is almost entirely independent of the xfs_mount that is using it - it is now much more tightly tied to the log and the items it is tracking in the log than it is tied to the xfs_mount. SGI-PV: 988143 SGI-Modid: xfs-linux-melb:xfs-kern:32353a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_dquot.c15
-rw-r--r--fs/xfs/quota/xfs_dquot_item.c8
2 files changed, 12 insertions, 11 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 0d7a62bffeed..591ca6602bfb 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -1319,8 +1319,10 @@ xfs_qm_dqflush_done(
1319 xfs_dq_logitem_t *qip) 1319 xfs_dq_logitem_t *qip)
1320{ 1320{
1321 xfs_dquot_t *dqp; 1321 xfs_dquot_t *dqp;
1322 struct xfs_ail *ailp;
1322 1323
1323 dqp = qip->qli_dquot; 1324 dqp = qip->qli_dquot;
1325 ailp = qip->qli_item.li_ailp;
1324 1326
1325 /* 1327 /*
1326 * We only want to pull the item from the AIL if its 1328 * We only want to pull the item from the AIL if its
@@ -1333,15 +1335,12 @@ xfs_qm_dqflush_done(
1333 if ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && 1335 if ((qip->qli_item.li_flags & XFS_LI_IN_AIL) &&
1334 qip->qli_item.li_lsn == qip->qli_flush_lsn) { 1336 qip->qli_item.li_lsn == qip->qli_flush_lsn) {
1335 1337
1336 spin_lock(&dqp->q_mount->m_ail->xa_lock); 1338 /* xfs_trans_ail_delete() drops the AIL lock. */
1337 /* 1339 spin_lock(&ailp->xa_lock);
1338 * xfs_trans_delete_ail() drops the AIL lock.
1339 */
1340 if (qip->qli_item.li_lsn == qip->qli_flush_lsn) 1340 if (qip->qli_item.li_lsn == qip->qli_flush_lsn)
1341 xfs_trans_delete_ail(dqp->q_mount, 1341 xfs_trans_ail_delete(ailp, (xfs_log_item_t*)qip);
1342 (xfs_log_item_t*)qip);
1343 else 1342 else
1344 spin_unlock(&dqp->q_mount->m_ail->xa_lock); 1343 spin_unlock(&ailp->xa_lock);
1345 } 1344 }
1346 1345
1347 /* 1346 /*
@@ -1371,7 +1370,7 @@ xfs_dqunlock(
1371 mutex_unlock(&(dqp->q_qlock)); 1370 mutex_unlock(&(dqp->q_qlock));
1372 if (dqp->q_logitem.qli_dquot == dqp) { 1371 if (dqp->q_logitem.qli_dquot == dqp) {
1373 /* Once was dqp->q_mount, but might just have been cleared */ 1372 /* Once was dqp->q_mount, but might just have been cleared */
1374 xfs_trans_unlocked_item(dqp->q_logitem.qli_item.li_mountp, 1373 xfs_trans_unlocked_item(dqp->q_logitem.qli_item.li_ailp,
1375 (xfs_log_item_t*)&(dqp->q_logitem)); 1374 (xfs_log_item_t*)&(dqp->q_logitem));
1376 } 1375 }
1377} 1376}
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c
index 0e1fa517db09..1728f6a7c4f5 100644
--- a/fs/xfs/quota/xfs_dquot_item.c
+++ b/fs/xfs/quota/xfs_dquot_item.c
@@ -553,14 +553,16 @@ xfs_qm_qoffend_logitem_committed(
553 xfs_lsn_t lsn) 553 xfs_lsn_t lsn)
554{ 554{
555 xfs_qoff_logitem_t *qfs; 555 xfs_qoff_logitem_t *qfs;
556 struct xfs_ail *ailp;
556 557
557 qfs = qfe->qql_start_lip; 558 qfs = qfe->qql_start_lip;
558 spin_lock(&qfs->qql_item.li_mountp->m_ail->xa_lock); 559 ailp = qfs->qql_item.li_ailp;
560 spin_lock(&ailp->xa_lock);
559 /* 561 /*
560 * Delete the qoff-start logitem from the AIL. 562 * Delete the qoff-start logitem from the AIL.
561 * xfs_trans_delete_ail() drops the AIL lock. 563 * xfs_trans_ail_delete() drops the AIL lock.
562 */ 564 */
563 xfs_trans_delete_ail(qfs->qql_item.li_mountp, (xfs_log_item_t *)qfs); 565 xfs_trans_ail_delete(ailp, (xfs_log_item_t *)qfs);
564 kmem_free(qfs); 566 kmem_free(qfs);
565 kmem_free(qfe); 567 kmem_free(qfe);
566 return (xfs_lsn_t)-1; 568 return (xfs_lsn_t)-1;