aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap_btree.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
index cdb74d2e2a43..aff82ed112c9 100644
--- a/fs/xfs/libxfs/xfs_bmap_btree.c
+++ b/fs/xfs/libxfs/xfs_bmap_btree.c
@@ -416,8 +416,10 @@ xfs_bmbt_verify(
416 xfs_failaddr_t fa; 416 xfs_failaddr_t fa;
417 unsigned int level; 417 unsigned int level;
418 418
419 switch (block->bb_magic) { 419 if (!xfs_verify_magic(bp, block->bb_magic))
420 case cpu_to_be32(XFS_BMAP_CRC_MAGIC): 420 return __this_address;
421
422 if (xfs_sb_version_hascrc(&mp->m_sb)) {
421 /* 423 /*
422 * XXX: need a better way of verifying the owner here. Right now 424 * XXX: need a better way of verifying the owner here. Right now
423 * just make sure there has been one set. 425 * just make sure there has been one set.
@@ -425,11 +427,6 @@ xfs_bmbt_verify(
425 fa = xfs_btree_lblock_v5hdr_verify(bp, XFS_RMAP_OWN_UNKNOWN); 427 fa = xfs_btree_lblock_v5hdr_verify(bp, XFS_RMAP_OWN_UNKNOWN);
426 if (fa) 428 if (fa)
427 return fa; 429 return fa;
428 /* fall through */
429 case cpu_to_be32(XFS_BMAP_MAGIC):
430 break;
431 default:
432 return __this_address;
433 } 430 }
434 431
435 /* 432 /*
@@ -481,6 +478,8 @@ xfs_bmbt_write_verify(
481 478
482const struct xfs_buf_ops xfs_bmbt_buf_ops = { 479const struct xfs_buf_ops xfs_bmbt_buf_ops = {
483 .name = "xfs_bmbt", 480 .name = "xfs_bmbt",
481 .magic = { cpu_to_be32(XFS_BMAP_MAGIC),
482 cpu_to_be32(XFS_BMAP_CRC_MAGIC) },
484 .verify_read = xfs_bmbt_read_verify, 483 .verify_read = xfs_bmbt_read_verify,
485 .verify_write = xfs_bmbt_write_verify, 484 .verify_write = xfs_bmbt_write_verify,
486 .verify_struct = xfs_bmbt_verify, 485 .verify_struct = xfs_bmbt_verify,