Commit 10ab7e32 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Kleber Sacilotto de Souza

f2fs: return correct errno in f2fs_gc

BugLink: https://bugs.launchpad.net/bugs/1853881

[ Upstream commit 61f7725a ]

This fixes overriding error number in f2fs_gc.
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 0834ea6e
......@@ -880,7 +880,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment