Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb040131 authored by Eric Sandeen's avatar Eric Sandeen Committed by Dave Chinner
Browse files

xfs: don't ASSERT on corrupt ftype



xfs_dir3_data_get_ftype() gets the file type off disk, but ASSERTs
if it's invalid:

     ASSERT(type < XFS_DIR3_FT_MAX);

We shouldn't ASSERT on bad values read from disk.  V3 dirs are
CRC-protected, but V2 dirs + ftype are not.

Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 8af3dcd3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -270,7 +270,6 @@ xfs_dir3_data_get_ftype(
{
	__uint8_t	ftype = dep->name[dep->namelen];

	ASSERT(ftype < XFS_DIR3_FT_MAX);
	if (ftype >= XFS_DIR3_FT_MAX)
		return XFS_DIR3_FT_UNKNOWN;
	return ftype;