diff options
| -rw-r--r-- | fs/f2fs/gc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 24acbbbd0b1d..400bc6d78372 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
| @@ -925,10 +925,14 @@ gc_more: | |||
| 925 | */ | 925 | */ |
| 926 | if (__get_victim(sbi, &segno, gc_type) || | 926 | if (__get_victim(sbi, &segno, gc_type) || |
| 927 | prefree_segments(sbi)) { | 927 | prefree_segments(sbi)) { |
| 928 | write_checkpoint(sbi, &cpc); | 928 | ret = write_checkpoint(sbi, &cpc); |
| 929 | if (ret) | ||
| 930 | goto stop; | ||
| 929 | segno = NULL_SEGNO; | 931 | segno = NULL_SEGNO; |
| 930 | } else if (has_not_enough_free_secs(sbi, 0, 0)) { | 932 | } else if (has_not_enough_free_secs(sbi, 0, 0)) { |
| 931 | write_checkpoint(sbi, &cpc); | 933 | ret = write_checkpoint(sbi, &cpc); |
| 934 | if (ret) | ||
| 935 | goto stop; | ||
| 932 | } | 936 | } |
| 933 | } | 937 | } |
| 934 | 938 | ||
| @@ -948,7 +952,7 @@ gc_more: | |||
| 948 | goto gc_more; | 952 | goto gc_more; |
| 949 | 953 | ||
| 950 | if (gc_type == FG_GC) | 954 | if (gc_type == FG_GC) |
| 951 | write_checkpoint(sbi, &cpc); | 955 | ret = write_checkpoint(sbi, &cpc); |
| 952 | } | 956 | } |
| 953 | stop: | 957 | stop: |
| 954 | mutex_unlock(&sbi->gc_mutex); | 958 | mutex_unlock(&sbi->gc_mutex); |
