Commit fa2075ba authored by Khazhismel Kumykov's avatar Khazhismel Kumykov Committed by Greg Kroah-Hartman

fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters()

[ Upstream commit ac081c3be3fae6d0cc3e1862507fca3862d30b67 ]

On non-preempt kernels this loop can take a long time (more than 50 ticks)
processing through entries.

Link: default avatarKhazhismel Kumykov <>
Acked-by: default avatarOGAWA Hirofumi <>
Reviewed-by: default avatarAndrew Morton <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
Signed-off-by: default avatarSasha Levin <>
parent 55df64d9
......@@ -681,6 +681,7 @@ int fat_count_free_clusters(struct super_block *sb)
if (ops->ent_get(&fatent) == FAT_ENT_FREE)
} while (fat_ent_next(sbi, &fatent));
sbi->free_clusters = free;
sbi->free_clus_valid = 1;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment