]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: don't assert fail on bad inode numbers
authorDave Chinner <dchinner@redhat.com>
Mon, 30 Sep 2013 03:15:18 +0000 (03:15 +0000)
committerRich Johnston <rjohnston@sgi.com>
Thu, 17 Oct 2013 19:46:42 +0000 (14:46 -0500)
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: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
libxfs/xfs_inode_buf.c

index 620531821ca1ee487a29d9c42a3de8e0c271663b..b096f7724c9c640252570b332a67631d7c9a232f 100644 (file)
@@ -39,9 +39,8 @@ xfs_inobp_check(
                                        i * mp->m_sb.sb_inodesize);
                if (!dip->di_next_unlinked)  {
                        xfs_alert(mp,
-       "Detected bogus zero next_unlinked field in incore inode buffer 0x%p.",
-                               bp);
-                       ASSERT(dip->di_next_unlinked);
+       "Detected bogus zero next_unlinked field in inode %d buffer 0x%llx.",
+                               i, (long long)bp->b_bn);
                }
        }
 }
@@ -74,11 +73,10 @@ xfs_inode_buf_verify(
                        XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_HIGH,
                                             mp, dip);
 #ifdef DEBUG
-                       xfs_emerg(mp,
+                       xfs_alert(mp,
                                "bad inode magic/vsn daddr %lld #%d (magic=%x)",
                                (unsigned long long)bp->b_bn, i,
                                be16_to_cpu(dip->di_magic));
-                       ASSERT(0);
 #endif
                }
        }