aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_da_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r--fs/xfs/xfs_da_btree.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 9eec594cc25a..4db5102d403a 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -2624,47 +2624,6 @@ xfs_da_read_buf(
2624 xfs_buf_set_ref(bp, XFS_ATTR_BTREE_REF); 2624 xfs_buf_set_ref(bp, XFS_ATTR_BTREE_REF);
2625 else 2625 else
2626 xfs_buf_set_ref(bp, XFS_DIR_BTREE_REF); 2626 xfs_buf_set_ref(bp, XFS_DIR_BTREE_REF);
2627
2628 /*
2629 * This verification code will be moved to a CRC verification callback
2630 * function so just leave it here unchanged until then.
2631 */
2632 {
2633 xfs_dir2_data_hdr_t *hdr = bp->b_addr;
2634 xfs_dir2_free_t *free = bp->b_addr;
2635 xfs_da_blkinfo_t *info = bp->b_addr;
2636 uint magic, magic1;
2637 struct xfs_mount *mp = dp->i_mount;
2638
2639 magic = be16_to_cpu(info->magic);
2640 magic1 = be32_to_cpu(hdr->magic);
2641 if (unlikely(
2642 XFS_TEST_ERROR((magic != XFS_DA_NODE_MAGIC) &&
2643 (magic != XFS_DA3_NODE_MAGIC) &&
2644 (magic != XFS_ATTR_LEAF_MAGIC) &&
2645 (magic != XFS_ATTR3_LEAF_MAGIC) &&
2646 (magic != XFS_DIR2_LEAF1_MAGIC) &&
2647 (magic != XFS_DIR3_LEAF1_MAGIC) &&
2648 (magic != XFS_DIR2_LEAFN_MAGIC) &&
2649 (magic != XFS_DIR3_LEAFN_MAGIC) &&
2650 (magic1 != XFS_DIR2_BLOCK_MAGIC) &&
2651 (magic1 != XFS_DIR3_BLOCK_MAGIC) &&
2652 (magic1 != XFS_DIR2_DATA_MAGIC) &&
2653 (magic1 != XFS_DIR3_DATA_MAGIC) &&
2654 (free->hdr.magic !=
2655 cpu_to_be32(XFS_DIR2_FREE_MAGIC)) &&
2656 (free->hdr.magic !=
2657 cpu_to_be32(XFS_DIR3_FREE_MAGIC)),
2658 mp, XFS_ERRTAG_DA_READ_BUF,
2659 XFS_RANDOM_DA_READ_BUF))) {
2660 trace_xfs_da_btree_corrupt(bp, _RET_IP_);
2661 XFS_CORRUPTION_ERROR("xfs_da_do_buf(2)",
2662 XFS_ERRLEVEL_LOW, mp, info);
2663 error = XFS_ERROR(EFSCORRUPTED);
2664 xfs_trans_brelse(trans, bp);
2665 goto out_free;
2666 }
2667 }
2668 *bpp = bp; 2627 *bpp = bp;
2669out_free: 2628out_free:
2670 if (mapp != &map) 2629 if (mapp != &map)