summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 23:32:43 +0300
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 23:32:43 +0300
commitbaf44fa5c37a2357a7ae92889f74bc1824f33fd4 (patch)
treec50e1ee0bb1048aebb8049e9ed85247f3c5cd773 /fs/xfs/xfs_inode.c
parentb280fb0cbf48cea962d90bbe9c080ee1e77c3b4c (diff)
downloadlinux-baf44fa5c37a2357a7ae92889f74bc1824f33fd4.tar.xz
xfs: report inode corruption errors to the health system
Whenever we encounter corrupt inode records, we should report that to the health monitoring system for later reporting. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index ab2d891b8d14..5d0ac5c733f3 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -3422,6 +3422,8 @@ flush_out:
/* generate the checksum. */
xfs_dinode_calc_crc(mp, dip);
+ if (error)
+ xfs_inode_mark_sick(ip, XFS_SICK_INO_CORE);
return error;
}