xfs: global error sign conversion
[deliverable/linux.git] / fs / xfs / xfs_buf_item.c
index 33149113e333bd8b536d71c80b234b5d39fcb53e..76007deed31fe4455d80956f5debf82faa8baf96 100644 (file)
@@ -488,7 +488,7 @@ xfs_buf_item_unpin(
                xfs_buf_lock(bp);
                xfs_buf_hold(bp);
                bp->b_flags |= XBF_ASYNC;
-               xfs_buf_ioerror(bp, EIO);
+               xfs_buf_ioerror(bp, -EIO);
                XFS_BUF_UNDONE(bp);
                xfs_buf_stale(bp);
                xfs_buf_ioend(bp, 0);
@@ -725,7 +725,7 @@ xfs_buf_item_get_format(
        bip->bli_formats = kmem_zalloc(count * sizeof(struct xfs_buf_log_format),
                                KM_SLEEP);
        if (!bip->bli_formats)
-               return ENOMEM;
+               return -ENOMEM;
        return 0;
 }
 
@@ -796,20 +796,6 @@ xfs_buf_item_init(
                bip->bli_formats[i].blf_map_size = map_size;
        }
 
-#ifdef XFS_TRANS_DEBUG
-       /*
-        * Allocate the arrays for tracking what needs to be logged
-        * and what our callers request to be logged.  bli_orig
-        * holds a copy of the original, clean buffer for comparison
-        * against, and bli_logged keeps a 1 bit flag per byte in
-        * the buffer to indicate which bytes the callers have asked
-        * to have logged.
-        */
-       bip->bli_orig = kmem_alloc(BBTOB(bp->b_length), KM_SLEEP);
-       memcpy(bip->bli_orig, bp->b_addr, BBTOB(bp->b_length));
-       bip->bli_logged = kmem_zalloc(BBTOB(bp->b_length) / NBBY, KM_SLEEP);
-#endif
-
        /*
         * Put the buf item into the list of items attached to the
         * buffer at the front.
@@ -826,7 +812,6 @@ xfs_buf_item_init(
  */
 static void
 xfs_buf_item_log_segment(
-       struct xfs_buf_log_item *bip,
        uint                    first,
        uint                    last,
        uint                    *map)
@@ -934,7 +919,7 @@ xfs_buf_item_log(
                if (end > last)
                        end = last;
 
-               xfs_buf_item_log_segment(bip, first, end,
+               xfs_buf_item_log_segment(first, end,
                                         &bip->bli_formats[i].blf_data_map[0]);
 
                start += bp->b_maps[i].bm_len;
@@ -957,11 +942,6 @@ STATIC void
 xfs_buf_item_free(
        xfs_buf_log_item_t      *bip)
 {
-#ifdef XFS_TRANS_DEBUG
-       kmem_free(bip->bli_orig);
-       kmem_free(bip->bli_logged);
-#endif /* XFS_TRANS_DEBUG */
-
        xfs_buf_item_free_format(bip);
        kmem_zone_free(xfs_buf_item_zone, bip);
 }
@@ -1072,7 +1052,7 @@ xfs_buf_iodone_callbacks(
        static ulong            lasttime;
        static xfs_buftarg_t    *lasttarg;
 
-       if (likely(!xfs_buf_geterror(bp)))
+       if (likely(!bp->b_error))
                goto do_callbacks;
 
        /*
This page took 0.025232 seconds and 5 git commands to generate.