]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_extfree_item.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_extfree_item.c
index 6dba78199faf54e40fcc36fcdf9a61cbe865b436..132bd07b9bb8abb5663e97e2190f3ee075260d61 100644 (file)
@@ -23,6 +23,7 @@
 #include "xfs_trans.h"
 #include "xfs_buf_item.h"
 #include "xfs_sb.h"
+#include "xfs_ag.h"
 #include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trans_priv.h"
@@ -109,19 +110,18 @@ STATIC void
 xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale)
 {
        xfs_mount_t     *mp;
-       SPLDECL(s);
 
        mp = efip->efi_item.li_mountp;
-       AIL_LOCK(mp, s);
+       spin_lock(&mp->m_ail_lock);
        if (efip->efi_flags & XFS_EFI_CANCELED) {
                /*
                 * xfs_trans_delete_ail() drops the AIL lock.
                 */
-               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s);
+               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
                xfs_efi_item_free(efip);
        } else {
                efip->efi_flags |= XFS_EFI_COMMITTED;
-               AIL_UNLOCK(mp, s);
+               spin_unlock(&mp->m_ail_lock);
        }
 }
 
@@ -137,10 +137,9 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp)
 {
        xfs_mount_t     *mp;
        xfs_log_item_desc_t     *lidp;
-       SPLDECL(s);
 
        mp = efip->efi_item.li_mountp;
-       AIL_LOCK(mp, s);
+       spin_lock(&mp->m_ail_lock);
        if (efip->efi_flags & XFS_EFI_CANCELED) {
                /*
                 * free the xaction descriptor pointing to this item
@@ -151,11 +150,11 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp)
                 * pull the item off the AIL.
                 * xfs_trans_delete_ail() drops the AIL lock.
                 */
-               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s);
+               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
                xfs_efi_item_free(efip);
        } else {
                efip->efi_flags |= XFS_EFI_COMMITTED;
-               AIL_UNLOCK(mp, s);
+               spin_unlock(&mp->m_ail_lock);
        }
 }
 
@@ -227,7 +226,7 @@ xfs_efi_item_committing(xfs_efi_log_item_t *efip, xfs_lsn_t lsn)
 /*
  * This is the ops vector shared by all efi log items.
  */
-STATIC struct xfs_item_ops xfs_efi_item_ops = {
+static struct xfs_item_ops xfs_efi_item_ops = {
        .iop_size       = (uint(*)(xfs_log_item_t*))xfs_efi_item_size,
        .iop_format     = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
                                        xfs_efi_item_format,
@@ -349,13 +348,12 @@ xfs_efi_release(xfs_efi_log_item_t        *efip,
 {
        xfs_mount_t     *mp;
        int             extents_left;
-       SPLDECL(s);
 
        mp = efip->efi_item.li_mountp;
        ASSERT(efip->efi_next_extent > 0);
        ASSERT(efip->efi_flags & XFS_EFI_COMMITTED);
 
-       AIL_LOCK(mp, s);
+       spin_lock(&mp->m_ail_lock);
        ASSERT(efip->efi_next_extent >= nextents);
        efip->efi_next_extent -= nextents;
        extents_left = efip->efi_next_extent;
@@ -363,10 +361,10 @@ xfs_efi_release(xfs_efi_log_item_t        *efip,
                /*
                 * xfs_trans_delete_ail() drops the AIL lock.
                 */
-               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s);
+               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
                xfs_efi_item_free(efip);
        } else {
-               AIL_UNLOCK(mp, s);
+               spin_unlock(&mp->m_ail_lock);
        }
 }
 
@@ -525,7 +523,7 @@ xfs_efd_item_committing(xfs_efd_log_item_t *efip, xfs_lsn_t lsn)
 /*
  * This is the ops vector shared by all efd log items.
  */
-STATIC struct xfs_item_ops xfs_efd_item_ops = {
+static struct xfs_item_ops xfs_efd_item_ops = {
        .iop_size       = (uint(*)(xfs_log_item_t*))xfs_efd_item_size,
        .iop_format     = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
                                        xfs_efd_item_format,