diff options
-rw-r--r-- | fs/exfat/fatent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c index 6f3651c6ca91..8df5ad6ebb10 100644 --- a/fs/exfat/fatent.c +++ b/fs/exfat/fatent.c @@ -265,7 +265,7 @@ int exfat_find_last_cluster(struct super_block *sb, struct exfat_chain *p_chain, clu = next; if (exfat_ent_get(sb, clu, &next)) return -EIO; - } while (next != EXFAT_EOF_CLUSTER); + } while (next != EXFAT_EOF_CLUSTER && count <= p_chain->size); if (p_chain->size != count) { exfat_fs_error(sb, |