diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-02-19 17:01:53 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-06-01 21:16:32 -0700 |
commit | cfbbe46526b7d1a192bf4b419dc3058d1506ac55 (patch) | |
tree | bbad980792c017c08234cf56f40abac17f383086 /fs/xfs/xfs_iops.c | |
parent | dafd1c788b77ddf959fdbb7443e2cc31f3d30abb (diff) |
xfs: report symlink block corruption errors to the health system
Whenever we encounter corrupt symbolic link blocks, we should report
that to the health monitoring system for later reporting.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_iops.c')
-rw-r--r-- | fs/xfs/xfs_iops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index f7a99b3bbcf7..30198f820046 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -21,6 +21,7 @@ #include "xfs_dir2.h" #include "xfs_iomap.h" #include "xfs_error.h" +#include "xfs_health.h" #include <linux/posix_acl.h> #include <linux/security.h> @@ -487,8 +488,10 @@ xfs_vn_get_link_inline( * if_data is junk. */ link = ip->i_df.if_u1.if_data; - if (XFS_IS_CORRUPT(ip->i_mount, !link)) + if (XFS_IS_CORRUPT(ip->i_mount, !link)) { + xfs_inode_mark_sick(ip, XFS_SICK_INO_SYMLINK); return ERR_PTR(-EFSCORRUPTED); + } return link; } |