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>
This commit is contained in:
Jaegeuk Kim 2016-09-21 09:28:06 -07:00
parent c5cf40b5ad
commit 7f29e1a031

View file

@ -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);