aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-09-21 09:28:06 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:34:09 +0200
commite603ce524b690ab7c46db92c007993fc0151d75f (patch)
treed48bb0acf70990200c66e86c88804f41cf635110
parent06207256c637bc4ef94df7a8672cab81b80a492c (diff)
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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 2b4159c74..02f870577 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -921,10 +921,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;
}
}
@@ -944,7 +948,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);