diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-21 18:28:06 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-10-01 02:34:24 +0200 |
commit | 2956e450fa08669ebf1541acb07843b5aa6acf96 (patch) | |
tree | dcf1564be2c905ab02270d398fe12208ae54d0db | |
parent | f2fs: add customized migrate_page callback (diff) | |
download | linux-2956e450fa08669ebf1541acb07843b5aa6acf96.tar.xz linux-2956e450fa08669ebf1541acb07843b5aa6acf96.zip |
f2fs: assign return value in f2fs_gc
This patch adds a return value of write_checkpoint for f2fs_gc.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-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: */ if (__get_victim(sbi, &segno, gc_type) || prefree_segments(sbi)) { - write_checkpoint(sbi, &cpc); + ret = write_checkpoint(sbi, &cpc); + if (ret) + goto stop; segno = NULL_SEGNO; } else if (has_not_enough_free_secs(sbi, 0, 0)) { - write_checkpoint(sbi, &cpc); + ret = write_checkpoint(sbi, &cpc); + if (ret) + goto stop; } } @@ -948,7 +952,7 @@ gc_more: goto gc_more; if (gc_type == FG_GC) - write_checkpoint(sbi, &cpc); + ret = write_checkpoint(sbi, &cpc); } stop: mutex_unlock(&sbi->gc_mutex); |