]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: btree lookup shouldn't ASSERT on empty btree nodes
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 3 Jun 2018 23:10:14 +0000 (16:10 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 Jun 2018 21:45:30 +0000 (14:45 -0700)
commit9f916502e217f0e8293c01a8baa154c7dab68a3f
treedc57a131d7b8e04da8157835efdbbfd0b19035c1
parentbdc7bbe3b7216f8cd6cbca6390449eca8762c1e0
xfs: btree lookup shouldn't ASSERT on empty btree nodes

If a btree lookup encounters an empty btree node or an empty btree leaf
on a multi-level btree, that's evidence of a corrupt on-disk btree.
Therefore, we should return -EFSCORRUPTED to the upper levels, not an
ASSERT failure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_btree.c