diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-09-03 07:47:38 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-09-10 15:07:54 -0400 |
commit | 74ffa796e127906883cacedcf3871494192c9e42 (patch) | |
tree | 8eea128166fde98513d755d378f78c53af0be7fc /fs/xfs | |
parent | 46f9d2eb37849a328011b182729990d2db3f4d52 (diff) |
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: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_inode_buf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/xfs_inode_buf.c b/fs/xfs/xfs_inode_buf.c index 3d25c9a5f6bc..63382d37f565 100644 --- a/fs/xfs/xfs_inode_buf.c +++ b/fs/xfs/xfs_inode_buf.c | |||
@@ -53,9 +53,8 @@ xfs_inobp_check( | |||
53 | i * mp->m_sb.sb_inodesize); | 53 | i * mp->m_sb.sb_inodesize); |
54 | if (!dip->di_next_unlinked) { | 54 | if (!dip->di_next_unlinked) { |
55 | xfs_alert(mp, | 55 | xfs_alert(mp, |
56 | "Detected bogus zero next_unlinked field in incore inode buffer 0x%p.", | 56 | "Detected bogus zero next_unlinked field in inode %d buffer 0x%llx.", |
57 | bp); | 57 | i, (long long)bp->b_bn); |
58 | ASSERT(dip->di_next_unlinked); | ||
59 | } | 58 | } |
60 | } | 59 | } |
61 | } | 60 | } |
@@ -106,11 +105,10 @@ xfs_inode_buf_verify( | |||
106 | XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_HIGH, | 105 | XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_HIGH, |
107 | mp, dip); | 106 | mp, dip); |
108 | #ifdef DEBUG | 107 | #ifdef DEBUG |
109 | xfs_emerg(mp, | 108 | xfs_alert(mp, |
110 | "bad inode magic/vsn daddr %lld #%d (magic=%x)", | 109 | "bad inode magic/vsn daddr %lld #%d (magic=%x)", |
111 | (unsigned long long)bp->b_bn, i, | 110 | (unsigned long long)bp->b_bn, i, |
112 | be16_to_cpu(dip->di_magic)); | 111 | be16_to_cpu(dip->di_magic)); |
113 | ASSERT(0); | ||
114 | #endif | 112 | #endif |
115 | } | 113 | } |
116 | } | 114 | } |