f2fs: return correct errno in f2fs_gc

This fixes overriding error number in f2fs_gc.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2018-09-25 15:25:21 -07:00
parent edc55aaf0d
commit 61f7725aa1

View file

@ -1253,7 +1253,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync,
put_gc_inode(&gc_list);
if (sync)
if (sync && !ret)
ret = sec_freed ? 0 : -EAGAIN;
return ret;
}