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>
This commit is contained in:
Darrick J. Wong
2019-08-11 15:52:26 -07:00
parent 294fc7a4c8
commit 858b44dc62
2 changed files with 14 additions and 8 deletions

View File

@@ -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.