]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_buf_item.c
kill xfs_buf_iostart
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_buf_item.c
index 002fc2617c8ee9426bff6203eb5bc6039094bf0a..d245d04e10ca284034ca769641c83dd6ff2a467a 100644 (file)
@@ -375,7 +375,7 @@ xfs_buf_item_unpin(
        xfs_buf_log_item_t      *bip,
        int                     stale)
 {
-       xfs_mount_t     *mp;
+       struct xfs_ail  *ailp;
        xfs_buf_t       *bp;
        int             freed;
 
@@ -387,7 +387,7 @@ xfs_buf_item_unpin(
        xfs_buftrace("XFS_UNPIN", bp);
 
        freed = atomic_dec_and_test(&bip->bli_refcount);
-       mp = bip->bli_item.li_mountp;
+       ailp = bip->bli_item.li_ailp;
        xfs_bunpin(bp);
        if (freed && stale) {
                ASSERT(bip->bli_flags & XFS_BLI_STALE);
@@ -399,17 +399,17 @@ xfs_buf_item_unpin(
                xfs_buftrace("XFS_UNPIN STALE", bp);
                /*
                 * If we get called here because of an IO error, we may
-                * or may not have the item on the AIL. xfs_trans_delete_ail()
+                * or may not have the item on the AIL. xfs_trans_ail_delete()
                 * will take care of that situation.
-                * xfs_trans_delete_ail() drops the AIL lock.
+                * xfs_trans_ail_delete() drops the AIL lock.
                 */
                if (bip->bli_flags & XFS_BLI_STALE_INODE) {
                        xfs_buf_do_callbacks(bp, (xfs_log_item_t *)bip);
                        XFS_BUF_SET_FSPRIVATE(bp, NULL);
                        XFS_BUF_CLR_IODONE_FUNC(bp);
                } else {
-                       spin_lock(&mp->m_ail_lock);
-                       xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip);
+                       spin_lock(&ailp->xa_lock);
+                       xfs_trans_ail_delete(ailp, (xfs_log_item_t *)bip);
                        xfs_buf_item_relse(bp);
                        ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL);
                }
@@ -731,6 +731,7 @@ xfs_buf_item_init(
        bip->bli_item.li_type = XFS_LI_BUF;
        bip->bli_item.li_ops = &xfs_buf_item_ops;
        bip->bli_item.li_mountp = mp;
+       bip->bli_item.li_ailp = mp->m_ail;
        bip->bli_buf = bp;
        xfs_buf_hold(bp);
        bip->bli_format.blf_type = XFS_LI_BUF;
@@ -1122,27 +1123,23 @@ xfs_buf_iodone(
        xfs_buf_t               *bp,
        xfs_buf_log_item_t      *bip)
 {
-       struct xfs_mount        *mp;
+       struct xfs_ail          *ailp = bip->bli_item.li_ailp;
 
        ASSERT(bip->bli_buf == bp);
 
        xfs_buf_rele(bp);
-       mp = bip->bli_item.li_mountp;
 
        /*
         * If we are forcibly shutting down, this may well be
         * off the AIL already. That's because we simulate the
         * log-committed callbacks to unpin these buffers. Or we may never
         * have put this item on AIL because of the transaction was
-        * aborted forcibly. xfs_trans_delete_ail() takes care of these.
+        * aborted forcibly. xfs_trans_ail_delete() takes care of these.
         *
         * Either way, AIL is useless if we're forcing a shutdown.
         */
-       spin_lock(&mp->m_ail_lock);
-       /*
-        * xfs_trans_delete_ail() drops the AIL lock.
-        */
-       xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip);
+       spin_lock(&ailp->xa_lock);
+       xfs_trans_ail_delete(ailp, (xfs_log_item_t *)bip);
        xfs_buf_item_free(bip);
 }