mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
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:
parent
5b7a487cf3
commit
2956e450fa
1 changed files with 7 additions and 3 deletions
10
fs/f2fs/gc.c
10
fs/f2fs/gc.c
|
@ -925,10 +925,14 @@ gc_more:
|
||||||
*/
|
*/
|
||||||
if (__get_victim(sbi, &segno, gc_type) ||
|
if (__get_victim(sbi, &segno, gc_type) ||
|
||||||
prefree_segments(sbi)) {
|
prefree_segments(sbi)) {
|
||||||
write_checkpoint(sbi, &cpc);
|
ret = write_checkpoint(sbi, &cpc);
|
||||||
|
if (ret)
|
||||||
|
goto stop;
|
||||||
segno = NULL_SEGNO;
|
segno = NULL_SEGNO;
|
||||||
} else if (has_not_enough_free_secs(sbi, 0, 0)) {
|
} 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;
|
goto gc_more;
|
||||||
|
|
||||||
if (gc_type == FG_GC)
|
if (gc_type == FG_GC)
|
||||||
write_checkpoint(sbi, &cpc);
|
ret = write_checkpoint(sbi, &cpc);
|
||||||
}
|
}
|
||||||
stop:
|
stop:
|
||||||
mutex_unlock(&sbi->gc_mutex);
|
mutex_unlock(&sbi->gc_mutex);
|
||||||
|
|
Loading…
Add table
Reference in a new issue