diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2014-09-23 10:05:32 +0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-09-23 10:05:32 +0400 |
commit | fb040131561a6b34cefb92cdf598218104abeda0 (patch) | |
tree | c5fae1013adc56bb89a1443313e246882d0dfab7 /fs/xfs | |
parent | 8af3dcd3c89aef10375bdd79d5f336b22b57487c (diff) | |
download | linux-fb040131561a6b34cefb92cdf598218104abeda0.tar.xz |
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: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_da_format.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_da_format.c b/fs/xfs/libxfs/xfs_da_format.c index c9aee52a37e2..7e42fdfd2f1d 100644 --- a/fs/xfs/libxfs/xfs_da_format.c +++ b/fs/xfs/libxfs/xfs_da_format.c @@ -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; |