diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-02 17:40:53 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-04 22:55:54 +0100 |
commit | a5155b870d687de1a5f07e774b49b1e8ef0f6f50 (patch) | |
tree | f0bb26d98278733f68b58f4ca40e57712e0fc14f /fs/xfs/xfs_attr_inactive.c | |
parent | xfs: constify the buffer pointer arguments to error functions (diff) | |
download | linux-a5155b870d687de1a5f07e774b49b1e8ef0f6f50.tar.xz linux-a5155b870d687de1a5f07e774b49b1e8ef0f6f50.zip |
xfs: always log corruption errors
Make sure we log something to dmesg whenever we return -EFSCORRUPTED up
the call stack.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_attr_inactive.c')
-rw-r--r-- | fs/xfs/xfs_attr_inactive.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c index f83f11d929e4..43ae392992e7 100644 --- a/fs/xfs/xfs_attr_inactive.c +++ b/fs/xfs/xfs_attr_inactive.c @@ -22,6 +22,7 @@ #include "xfs_attr_leaf.h" #include "xfs_quota.h" #include "xfs_dir2.h" +#include "xfs_error.h" /* * Look at all the extents for this logical region, @@ -209,6 +210,7 @@ xfs_attr3_node_inactive( */ if (level > XFS_DA_NODE_MAXDEPTH) { xfs_trans_brelse(*trans, bp); /* no locks for later trans */ + xfs_buf_corruption_error(bp); return -EFSCORRUPTED; } @@ -258,8 +260,9 @@ xfs_attr3_node_inactive( error = xfs_attr3_leaf_inactive(trans, dp, child_bp); break; default: - error = -EFSCORRUPTED; + xfs_buf_corruption_error(child_bp); xfs_trans_brelse(*trans, child_bp); + error = -EFSCORRUPTED; break; } if (error) @@ -342,6 +345,7 @@ xfs_attr3_root_inactive( break; default: error = -EFSCORRUPTED; + xfs_buf_corruption_error(bp); xfs_trans_brelse(*trans, bp); break; } |