diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 8ae3775a9b63..b872e9cedb69 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -244,30 +244,6 @@ xfs_bmap_forkoff_reset( | |||
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | /* | ||
248 | * Debug/sanity checking code | ||
249 | */ | ||
250 | |||
251 | STATIC int | ||
252 | xfs_bmap_sanity_check( | ||
253 | struct xfs_mount *mp, | ||
254 | struct xfs_buf *bp, | ||
255 | int level) | ||
256 | { | ||
257 | struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); | ||
258 | |||
259 | if (block->bb_magic != cpu_to_be32(XFS_BMAP_CRC_MAGIC) && | ||
260 | block->bb_magic != cpu_to_be32(XFS_BMAP_MAGIC)) | ||
261 | return 0; | ||
262 | |||
263 | if (be16_to_cpu(block->bb_level) != level || | ||
264 | be16_to_cpu(block->bb_numrecs) == 0 || | ||
265 | be16_to_cpu(block->bb_numrecs) > mp->m_bmap_dmxr[level != 0]) | ||
266 | return 0; | ||
267 | |||
268 | return 1; | ||
269 | } | ||
270 | |||
271 | #ifdef DEBUG | 247 | #ifdef DEBUG |
272 | STATIC struct xfs_buf * | 248 | STATIC struct xfs_buf * |
273 | xfs_bmap_get_bp( | 249 | xfs_bmap_get_bp( |
@@ -410,9 +386,6 @@ xfs_bmap_check_leaf_extents( | |||
410 | goto error_norelse; | 386 | goto error_norelse; |
411 | } | 387 | } |
412 | block = XFS_BUF_TO_BLOCK(bp); | 388 | block = XFS_BUF_TO_BLOCK(bp); |
413 | XFS_WANT_CORRUPTED_GOTO(mp, | ||
414 | xfs_bmap_sanity_check(mp, bp, level), | ||
415 | error0); | ||
416 | if (level == 0) | 389 | if (level == 0) |
417 | break; | 390 | break; |
418 | 391 | ||
@@ -1312,8 +1285,6 @@ xfs_bmap_read_extents( | |||
1312 | if (error) | 1285 | if (error) |
1313 | return error; | 1286 | return error; |
1314 | block = XFS_BUF_TO_BLOCK(bp); | 1287 | block = XFS_BUF_TO_BLOCK(bp); |
1315 | XFS_WANT_CORRUPTED_GOTO(mp, | ||
1316 | xfs_bmap_sanity_check(mp, bp, level), error0); | ||
1317 | if (level == 0) | 1288 | if (level == 0) |
1318 | break; | 1289 | break; |
1319 | pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[1]); | 1290 | pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[1]); |
@@ -1346,9 +1317,6 @@ xfs_bmap_read_extents( | |||
1346 | XFS_ERRLEVEL_LOW, ip->i_mount, block); | 1317 | XFS_ERRLEVEL_LOW, ip->i_mount, block); |
1347 | goto error0; | 1318 | goto error0; |
1348 | } | 1319 | } |
1349 | XFS_WANT_CORRUPTED_GOTO(mp, | ||
1350 | xfs_bmap_sanity_check(mp, bp, 0), | ||
1351 | error0); | ||
1352 | /* | 1320 | /* |
1353 | * Read-ahead the next leaf block, if any. | 1321 | * Read-ahead the next leaf block, if any. |
1354 | */ | 1322 | */ |