From: Dave Chinner Date: Mon, 30 Sep 2013 03:15:18 +0000 (+0000) Subject: xfs: don't assert fail on bad inode numbers X-Git-Tag: v3.2.0-alpha2~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea6a00d47a01bc1df218742784712a12929ab77e;p=thirdparty%2Fxfsprogs-dev.git 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 Reviewed-by: Eric Sandeen Signed-off-by: Rich Johnston --- diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c index 620531821..b096f7724 100644 --- a/libxfs/xfs_inode_buf.c +++ b/libxfs/xfs_inode_buf.c @@ -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 } }