mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: convert a few more directory asserts to corruption
Yet another round of playing whack-a-mole with directory code that asserts on corrupt on-disk metadata when it really should be returning -EFSCORRUPTED instead of ASSERTing. Found by a xfs/391 crash while lastbit fuzzing of ltail.bestcount. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
parent
8241f7f983
commit
3f883f5bb1
2 changed files with 5 additions and 3 deletions
|
@ -1415,7 +1415,8 @@ xfs_dir2_leaf_removename(
|
|||
oldbest = be16_to_cpu(bf[0].length);
|
||||
ltp = xfs_dir2_leaf_tail_p(args->geo, leaf);
|
||||
bestsp = xfs_dir2_leaf_bests_p(ltp);
|
||||
ASSERT(be16_to_cpu(bestsp[db]) == oldbest);
|
||||
if (be16_to_cpu(bestsp[db]) != oldbest)
|
||||
return -EFSCORRUPTED;
|
||||
/*
|
||||
* Mark the former data entry unused.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue