summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-22 18:09:48 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-29 07:27:22 -0800
commit22431bf3dfbf44d7356933776eb486a6a01dea6f (patch)
tree5d4aecebcd8cdb86a29e317d2ddeadaff9ed4e85 /fs/xfs/libxfs
parent67a3f6d01495bbf520186aa3ecd013ba02b81462 (diff)
downloadlinux-22431bf3dfbf44d7356933776eb486a6a01dea6f.tar.bz2
xfs: refactor inode verifier corruption error printing
Refactor inode verifier error reporting into a non-libxfs function so that we aren't encoding the message format in libxfs. This also changes the kernel dmesg output to resemble buffer verifier errors more closely. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r--fs/xfs/libxfs/xfs_inode_buf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
index 4035b5d5f6fd..d7e7e58f0ee2 100644
--- a/fs/xfs/libxfs/xfs_inode_buf.c
+++ b/fs/xfs/libxfs/xfs_inode_buf.c
@@ -578,10 +578,8 @@ xfs_iread(
/* even unallocated inodes are verified */
fa = xfs_dinode_verify(mp, ip->i_ino, dip);
if (fa) {
- xfs_alert(mp, "%s: validation failed for inode %lld at %pS",
- __func__, ip->i_ino, fa);
-
- XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, dip);
+ xfs_inode_verifier_error(ip, -EFSCORRUPTED, "dinode", dip,
+ sizeof(*dip), fa);
error = -EFSCORRUPTED;
goto out_brelse;
}