diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_da_btree.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c index 355322688c9f..e02d2f407e12 100644 --- a/fs/xfs/libxfs/xfs_da_btree.c +++ b/fs/xfs/libxfs/xfs_da_btree.c | |||
@@ -129,21 +129,18 @@ xfs_da3_node_verify( | |||
129 | 129 | ||
130 | ops->node_hdr_from_disk(&ichdr, hdr); | 130 | ops->node_hdr_from_disk(&ichdr, hdr); |
131 | 131 | ||
132 | if (!xfs_verify_magic(bp, hdr->hdr.info.magic)) | ||
133 | return __this_address; | ||
134 | |||
132 | if (xfs_sb_version_hascrc(&mp->m_sb)) { | 135 | if (xfs_sb_version_hascrc(&mp->m_sb)) { |
133 | struct xfs_da3_node_hdr *hdr3 = bp->b_addr; | 136 | struct xfs_da3_node_hdr *hdr3 = bp->b_addr; |
134 | 137 | ||
135 | if (hdr3->info.hdr.magic != cpu_to_be16(XFS_DA3_NODE_MAGIC)) | ||
136 | return __this_address; | ||
137 | |||
138 | if (!uuid_equal(&hdr3->info.uuid, &mp->m_sb.sb_meta_uuid)) | 138 | if (!uuid_equal(&hdr3->info.uuid, &mp->m_sb.sb_meta_uuid)) |
139 | return __this_address; | 139 | return __this_address; |
140 | if (be64_to_cpu(hdr3->info.blkno) != bp->b_bn) | 140 | if (be64_to_cpu(hdr3->info.blkno) != bp->b_bn) |
141 | return __this_address; | 141 | return __this_address; |
142 | if (!xfs_log_check_lsn(mp, be64_to_cpu(hdr3->info.lsn))) | 142 | if (!xfs_log_check_lsn(mp, be64_to_cpu(hdr3->info.lsn))) |
143 | return __this_address; | 143 | return __this_address; |
144 | } else { | ||
145 | if (hdr->hdr.info.magic != cpu_to_be16(XFS_DA_NODE_MAGIC)) | ||
146 | return __this_address; | ||
147 | } | 144 | } |
148 | if (ichdr.level == 0) | 145 | if (ichdr.level == 0) |
149 | return __this_address; | 146 | return __this_address; |
@@ -257,6 +254,8 @@ xfs_da3_node_verify_struct( | |||
257 | 254 | ||
258 | const struct xfs_buf_ops xfs_da3_node_buf_ops = { | 255 | const struct xfs_buf_ops xfs_da3_node_buf_ops = { |
259 | .name = "xfs_da3_node", | 256 | .name = "xfs_da3_node", |
257 | .magic = { cpu_to_be16(XFS_DA_NODE_MAGIC), | ||
258 | cpu_to_be16(XFS_DA3_NODE_MAGIC) }, | ||
260 | .verify_read = xfs_da3_node_read_verify, | 259 | .verify_read = xfs_da3_node_read_verify, |
261 | .verify_write = xfs_da3_node_write_verify, | 260 | .verify_write = xfs_da3_node_write_verify, |
262 | .verify_struct = xfs_da3_node_verify_struct, | 261 | .verify_struct = xfs_da3_node_verify_struct, |