diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-11 15:52:26 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-12 09:32:44 -0700 |
commit | 858b44dc62a1018312fd9cbd15db24237a897e0e (patch) | |
tree | fb0ceed8fd24394fb23c37f2d9f8c2c44c4be985 /fs/xfs/libxfs/xfs_dir2_node.c | |
parent | 294fc7a4c8ec42b3053b1d2e87b0dafef80a76b8 (diff) | |
download | linux-858b44dc62a1018312fd9cbd15db24237a897e0e.tar.bz2 |
xfs: remove more ondisk directory corruption asserts
Continue our game of replacing ASSERTs for corrupt ondisk metadata with
EFSCORRUPTED returns.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c index afcc6642690a..1fc44efc344d 100644 --- a/fs/xfs/libxfs/xfs_dir2_node.c +++ b/fs/xfs/libxfs/xfs_dir2_node.c @@ -741,7 +741,8 @@ xfs_dir2_leafn_lookup_for_entry( ents = dp->d_ops->leaf_ents_p(leaf); xfs_dir3_leaf_check(dp, bp); - ASSERT(leafhdr.count > 0); + if (leafhdr.count <= 0) + return -EFSCORRUPTED; /* * Look up the hash value in the leaf entries. |