security: remove dummy module
[safe/jmp/linux-2.6] / fs / xfs / xfs_buf_item.c
index 4597381..53a71c6 100644 (file)
@@ -23,6 +23,7 @@
 #include "xfs_inum.h"
 #include "xfs_trans.h"
 #include "xfs_sb.h"
+#include "xfs_ag.h"
 #include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_buf_item.h"
@@ -377,7 +378,6 @@ xfs_buf_item_unpin(
        xfs_mount_t     *mp;
        xfs_buf_t       *bp;
        int             freed;
-       SPLDECL(s);
 
        bp = bip->bli_buf;
        ASSERT(bp != NULL);
@@ -408,8 +408,8 @@ xfs_buf_item_unpin(
                        XFS_BUF_SET_FSPRIVATE(bp, NULL);
                        XFS_BUF_CLR_IODONE_FUNC(bp);
                } else {
-                       AIL_LOCK(mp,s);
-                       xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip, s);
+                       spin_lock(&mp->m_ail_lock);
+                       xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip);
                        xfs_buf_item_relse(bp);
                        ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL);
                }
@@ -580,8 +580,8 @@ xfs_buf_item_unlock(
         * If the buf item isn't tracking any data, free it.
         * Otherwise, if XFS_BLI_HOLD is set clear it.
         */
-       if (xfs_count_bits(bip->bli_format.blf_data_map,
-                             bip->bli_format.blf_map_size, 0) == 0) {
+       if (xfs_bitmap_empty(bip->bli_format.blf_data_map,
+                            bip->bli_format.blf_map_size)) {
                xfs_buf_item_relse(bp);
        } else if (hold) {
                bip->bli_flags &= ~XFS_BLI_HOLD;
@@ -627,25 +627,6 @@ xfs_buf_item_committed(
 }
 
 /*
- * This is called when the transaction holding the buffer is aborted.
- * Just behave as if the transaction had been cancelled. If we're shutting down
- * and have aborted this transaction, we'll trap this buffer when it tries to
- * get written out.
- */
-STATIC void
-xfs_buf_item_abort(
-       xfs_buf_log_item_t      *bip)
-{
-       xfs_buf_t       *bp;
-
-       bp = bip->bli_buf;
-       xfs_buftrace("XFS_ABORT", bp);
-       XFS_BUF_SUPER_STALE(bp);
-       xfs_buf_item_unlock(bip);
-       return;
-}
-
-/*
  * This is called to asynchronously write the buffer associated with this
  * buf log item out to disk. The buffer will already have been locked by
  * a successful call to xfs_buf_item_trylock().  If the buffer still has
@@ -664,7 +645,12 @@ xfs_buf_item_push(
        bp = bip->bli_buf;
 
        if (XFS_BUF_ISDELAYWRITE(bp)) {
-               xfs_bawrite(bip->bli_item.li_mountp, bp);
+               int     error;
+               error = xfs_bawrite(bip->bli_item.li_mountp, bp);
+               if (error)
+                       xfs_fs_cmn_err(CE_WARN, bip->bli_item.li_mountp,
+                       "xfs_buf_item_push: pushbuf error %d on bip %p, bp %p",
+                                       error, bip, bp);
        } else {
                xfs_buf_relse(bp);
        }
@@ -679,7 +665,7 @@ xfs_buf_item_committing(xfs_buf_log_item_t *bip, xfs_lsn_t commit_lsn)
 /*
  * This is the ops vector shared by all buf log items.
  */
-STATIC struct xfs_item_ops xfs_buf_item_ops = {
+static struct xfs_item_ops xfs_buf_item_ops = {
        .iop_size       = (uint(*)(xfs_log_item_t*))xfs_buf_item_size,
        .iop_format     = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
                                        xfs_buf_item_format,
@@ -692,7 +678,6 @@ STATIC struct xfs_item_ops xfs_buf_item_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_buf_item_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_buf_item_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_buf_item_abort,
        .iop_pushbuf    = NULL,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_buf_item_committing
@@ -1132,7 +1117,6 @@ xfs_buf_iodone(
        xfs_buf_log_item_t      *bip)
 {
        struct xfs_mount        *mp;
-       SPLDECL(s);
 
        ASSERT(bip->bli_buf == bp);
 
@@ -1147,11 +1131,11 @@ xfs_buf_iodone(
         *
         * Either way, AIL is useless if we're forcing a shutdown.
         */
-       AIL_LOCK(mp,s);
+       spin_lock(&mp->m_ail_lock);
        /*
         * xfs_trans_delete_ail() drops the AIL lock.
         */
-       xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip, s);
+       xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip);
 
 #ifdef XFS_TRANS_DEBUG
        kmem_free(bip->bli_orig, XFS_BUF_COUNT(bp));