]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_trans_inode.c
dlm: use idr_for_each_entry() in recover_idr_clear() error path
[karo-tx-linux.git] / fs / xfs / xfs_trans_inode.c
index d2eee20d5f5b799cdaff6be9f11a33706dced0ee..ac6d567704dbef8beb6c2b74bc22250a2f5da77b 100644 (file)
 #include "xfs_inode_item.h"
 #include "xfs_trace.h"
 
-#ifdef XFS_TRANS_DEBUG
-STATIC void
-xfs_trans_inode_broot_debug(
-       xfs_inode_t     *ip);
-#else
-#define        xfs_trans_inode_broot_debug(ip)
-#endif
-
 /*
  * Add a locked inode to the transaction.
  *
@@ -67,8 +59,6 @@ xfs_trans_ijoin(
         * Get a log_item_desc to point at the new item.
         */
        xfs_trans_add_item(tp, &iip->ili_item);
-
-       xfs_trans_inode_broot_debug(ip);
 }
 
 /*
@@ -135,34 +125,3 @@ xfs_trans_log_inode(
        flags |= ip->i_itemp->ili_last_fields;
        ip->i_itemp->ili_fields |= flags;
 }
-
-#ifdef XFS_TRANS_DEBUG
-/*
- * Keep track of the state of the inode btree root to make sure we
- * log it properly.
- */
-STATIC void
-xfs_trans_inode_broot_debug(
-       xfs_inode_t     *ip)
-{
-       xfs_inode_log_item_t    *iip;
-
-       ASSERT(ip->i_itemp != NULL);
-       iip = ip->i_itemp;
-       if (iip->ili_root_size != 0) {
-               ASSERT(iip->ili_orig_root != NULL);
-               kmem_free(iip->ili_orig_root);
-               iip->ili_root_size = 0;
-               iip->ili_orig_root = NULL;
-       }
-       if (ip->i_d.di_format == XFS_DINODE_FMT_BTREE) {
-               ASSERT((ip->i_df.if_broot != NULL) &&
-                      (ip->i_df.if_broot_bytes > 0));
-               iip->ili_root_size = ip->i_df.if_broot_bytes;
-               iip->ili_orig_root =
-                       (char*)kmem_alloc(iip->ili_root_size, KM_SLEEP);
-               memcpy(iip->ili_orig_root, (char*)(ip->i_df.if_broot),
-                     iip->ili_root_size);
-       }
-}
-#endif