summaryrefslogtreecommitdiff
path: root/fs/fat/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/dir.c')
-rw-r--r--fs/fat/dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 58bf744dbf39..78dabf00f46f 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -484,10 +484,10 @@ parse_record:
nr_slots = 0;
if (de->name[0] == DELETED_FLAG)
continue;
+ if (!de->name[0])
+ goto end_of_dir;
if (de->attr != ATTR_EXT && (de->attr & ATTR_VOLUME))
continue;
- if (de->attr != ATTR_EXT && IS_FREE(de->name))
- continue;
if (de->attr == ATTR_EXT) {
int status = fat_parse_long(inode, &cpos, &bh, &de,
&unicode, &nr_slots);
@@ -608,8 +608,8 @@ parse_record:
goto record_end;
if (de->attr != ATTR_EXT && (de->attr & ATTR_VOLUME))
goto record_end;
- if (de->attr != ATTR_EXT && IS_FREE(de->name))
- goto record_end;
+ if (!de->name[0])
+ goto end_of_dir;
} else {
if ((de->attr & ATTR_VOLUME) || IS_FREE(de->name))
goto record_end;