| To: | Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH V2] xfs: don't ASSERT on corrupt ftype |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Mon, 08 Sep 2014 17:18:07 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <540D011B.2000807@xxxxxxxxxx> |
| References: | <540D011B.2000807@xxxxxxxxxx> |
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@xxxxxxxxxx>
---
diff --git a/fs/xfs/libxfs/xfs_da_format.c b/fs/xfs/libxfs/xfs_da_format.c
index c9aee52..7e42fdf 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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: converting from external log to internal log ... is this possible?, Dave Chinner |
|---|---|
| Next by Date: | [PATCH] xfs: xlog_cil_force_lsn doesn't always wait correctly, Dave Chinner |
| Previous by Thread: | Re: [PATCH] xfs: don't ASSERT on corrupt ftype, Dave Chinner |
| Next by Thread: | converting from external log to internal log ... is this possible?, Joe Landman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |