fs/fat: add cond_resched to fat_count_free_clusters
PATCH 1/1 fs/fat: add cond_resched to fat_count_free_clusters
On non-preempt kernels this loop can take a long time (more than 50 ticks) processing through entries.
Signed-off-by Khazhismel Kumykov <[email protected]>
--- fs/fat/fatent.c | 1 + 1 file changed, 1 insertion(+)
fs/fat/fatent.c +1 -0
@@ -682,6 +682,7 @@ int fat_count_free_clusters(struct super_block *sb)if (ops->ent_get (&fatent) ==FAT_ENT_FREE ) free++; }while (fat_ent_next (sbi, &fatent)); +cond_resched (); } sbi->free_clusters = free; sbi->free_clus_valid =1 ;
Signature · 1 line
2.19.0.605.g01d371f741-goog
Quoted 13 lines · Khazhismel Kumykov
On non-preempt kernels this loop can take a long time (more than 50 ticks) processing through entries.
Signed-off-by Khazhismel Kumykov <[email protected]>--- fs/fat/fatent.c | 1 + 1 file changed, 1 insertion(+)fs/fat/fatent.c +0
-0
fs/fat/fatent.c int fat_count_free_clusters(struct super_block *sb) · line 688
Quoted 7 lines
fs/fat/fatent.c +1
-0@@ -682,6 +682,7 @@ int fat_count_free_clusters(struct super_block *sb)if (ops->ent_get (&fatent) ==FAT_ENT_FREE ) free++; }while (fat_ent_next (sbi, &fatent)); +cond_resched (); } sbi->free_clusters = free; sbi->free_clus_valid =1 ;
Acked-by OGAWA Hirofumi <[email protected]>
Thanks, looks good.
Signature · 1 line
OGAWA Hirofumi <[email protected]>