xfs: remove XFS_TRANS_DEBUG dead code [Linux 3.15]

This Linux kernel change "xfs: remove XFS_TRANS_DEBUG dead code" is included in the Linux 3.15 release. This change is authored by Jie Liu <jeff.liu [at] oracle.com> on Fri Feb 7 15:26:11 2014 +1100. The commit for this change in Linux stable tree is 492185e (patch).

xfs: remove XFS_TRANS_DEBUG dead code

Remove the leftover XFS_TRANS_DEBUG dead code following the previous
cleaning up of it in commits ec47eb6b0b450.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>

There are 19 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/xfs/xfs_buf_item.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 3314911..8752821 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -796,20 +796,6 @@ static inline struct xfs_buf_log_item *BUF_ITEM(struct xfs_log_item *lip)
        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.
@@ -957,11 +943,6 @@ static inline struct xfs_buf_log_item *BUF_ITEM(struct xfs_log_item *lip)
 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);
 }

Leave a Reply

Your email address will not be published. Required fields are marked *