diff options
-rw-r--r-- | fs/exfat/fatent.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c index 65a8c9fb072c..c75c5a2cad42 100644 --- a/fs/exfat/fatent.c +++ b/fs/exfat/fatent.c @@ -344,8 +344,9 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, /* check cluster validation */ if (!is_valid_cluster(sbi, hint_clu)) { - exfat_err(sb, "hint_cluster is invalid (%u)", - hint_clu); + if (hint_clu != sbi->num_clusters) + exfat_err(sb, "hint_cluster is invalid (%u), rewind to the first cluster", + hint_clu); hint_clu = EXFAT_FIRST_CLUSTER; p_chain->flags = ALLOC_FAT_CHAIN; } |