aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/gc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index de6c41c32c62..06cfb94cc3db 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -908,10 +908,13 @@ gc_more:
908 * enough free sections, we should flush dent/node blocks and do 908 * enough free sections, we should flush dent/node blocks and do
909 * garbage collections. 909 * garbage collections.
910 */ 910 */
911 if (__get_victim(sbi, &segno, gc_type) || prefree_segments(sbi)) 911 if (__get_victim(sbi, &segno, gc_type) ||
912 prefree_segments(sbi)) {
912 write_checkpoint(sbi, &cpc); 913 write_checkpoint(sbi, &cpc);
913 else if (has_not_enough_free_secs(sbi, 0)) 914 segno = NULL_SEGNO;
915 } else if (has_not_enough_free_secs(sbi, 0)) {
914 write_checkpoint(sbi, &cpc); 916 write_checkpoint(sbi, &cpc);
917 }
915 } 918 }
916 919
917 if (segno == NULL_SEGNO && !__get_victim(sbi, &segno, gc_type)) 920 if (segno == NULL_SEGNO && !__get_victim(sbi, &segno, gc_type))