Commit 74ffa796 authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers

xfs: don't assert fail on bad inode numbers

Let the inode verifier do it's work by returning an error when we
fail to find correct magic numbers in an inode buffer.
Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 46f9d2eb
...@@ -53,9 +53,8 @@ xfs_inobp_check( ...@@ -53,9 +53,8 @@ xfs_inobp_check(
i * mp->m_sb.sb_inodesize); i * mp->m_sb.sb_inodesize);
if (!dip->di_next_unlinked) { if (!dip->di_next_unlinked) {
xfs_alert(mp, xfs_alert(mp,
"Detected bogus zero next_unlinked field in incore inode buffer 0x%p.", "Detected bogus zero next_unlinked field in inode %d buffer 0x%llx.",
bp); i, (long long)bp->b_bn);
ASSERT(dip->di_next_unlinked);
} }
} }
} }
...@@ -106,11 +105,10 @@ xfs_inode_buf_verify( ...@@ -106,11 +105,10 @@ xfs_inode_buf_verify(
XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_HIGH, XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_HIGH,
mp, dip); mp, dip);
#ifdef DEBUG #ifdef DEBUG
xfs_emerg(mp, xfs_alert(mp,
"bad inode magic/vsn daddr %lld #%d (magic=%x)", "bad inode magic/vsn daddr %lld #%d (magic=%x)",
(unsigned long long)bp->b_bn, i, (unsigned long long)bp->b_bn, i,
be16_to_cpu(dip->di_magic)); be16_to_cpu(dip->di_magic));
ASSERT(0);
#endif #endif
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment