aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode_item.c
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/xfs_inode_item.c
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/xfs_inode_item.c')
-rw-r--r--fs/xfs/xfs_inode_item.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index 47594f4b51db..aa9bf05060c6 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -977,9 +977,8 @@ xfs_iflush_done(
977 xfs_buf_t *bp, 977 xfs_buf_t *bp,
978 xfs_inode_log_item_t *iip) 978 xfs_inode_log_item_t *iip)
979{ 979{
980 xfs_inode_t *ip; 980 xfs_inode_t *ip = iip->ili_inode;
981 981 struct xfs_ail *ailp = iip->ili_item.li_ailp;
982 ip = iip->ili_inode;
983 982
984 /* 983 /*
985 * We only want to pull the item from the AIL if it is 984 * We only want to pull the item from the AIL if it is
@@ -992,15 +991,12 @@ xfs_iflush_done(
992 */ 991 */
993 if (iip->ili_logged && 992 if (iip->ili_logged &&
994 (iip->ili_item.li_lsn == iip->ili_flush_lsn)) { 993 (iip->ili_item.li_lsn == iip->ili_flush_lsn)) {
995 spin_lock(&ip->i_mount->m_ail->xa_lock); 994 spin_lock(&ailp->xa_lock);
996 if (iip->ili_item.li_lsn == iip->ili_flush_lsn) { 995 if (iip->ili_item.li_lsn == iip->ili_flush_lsn) {
997 /* 996 /* xfs_trans_ail_delete() drops the AIL lock. */
998 * xfs_trans_delete_ail() drops the AIL lock. 997 xfs_trans_ail_delete(ailp, (xfs_log_item_t*)iip);
999 */
1000 xfs_trans_delete_ail(ip->i_mount,
1001 (xfs_log_item_t*)iip);
1002 } else { 998 } else {
1003 spin_unlock(&ip->i_mount->m_ail->xa_lock); 999 spin_unlock(&ailp->xa_lock);
1004 } 1000 }
1005 } 1001 }
1006 1002
@@ -1032,21 +1028,20 @@ void
1032xfs_iflush_abort( 1028xfs_iflush_abort(
1033 xfs_inode_t *ip) 1029 xfs_inode_t *ip)
1034{ 1030{
1035 xfs_inode_log_item_t *iip; 1031 xfs_inode_log_item_t *iip = ip->i_itemp;
1036 xfs_mount_t *mp; 1032 xfs_mount_t *mp;
1037 1033
1038 iip = ip->i_itemp; 1034 iip = ip->i_itemp;
1039 mp = ip->i_mount; 1035 mp = ip->i_mount;
1040 if (iip) { 1036 if (iip) {
1037 struct xfs_ail *ailp = iip->ili_item.li_ailp;
1041 if (iip->ili_item.li_flags & XFS_LI_IN_AIL) { 1038 if (iip->ili_item.li_flags & XFS_LI_IN_AIL) {
1042 spin_lock(&mp->m_ail->xa_lock); 1039 spin_lock(&ailp->xa_lock);
1043 if (iip->ili_item.li_flags & XFS_LI_IN_AIL) { 1040 if (iip->ili_item.li_flags & XFS_LI_IN_AIL) {
1044 /* 1041 /* xfs_trans_ail_delete() drops the AIL lock. */
1045 * xfs_trans_delete_ail() drops the AIL lock. 1042 xfs_trans_ail_delete(ailp, (xfs_log_item_t *)iip);
1046 */
1047 xfs_trans_delete_ail(mp, (xfs_log_item_t *)iip);
1048 } else 1043 } else
1049 spin_unlock(&mp->m_ail->xa_lock); 1044 spin_unlock(&ailp->xa_lock);
1050 } 1045 }
1051 iip->ili_logged = 0; 1046 iip->ili_logged = 0;
1052 /* 1047 /*