f2fs: check free_sections for defragmentation

Fix wrong condition check for defragmentation of a file.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
这个提交包含在:
Jaegeuk Kim
2016-09-01 12:02:51 -07:00
父节点 ed214a1183
当前提交 7f3037a5ec
修改 5 个文件,包含 15 行新增14 行删除

查看文件

@@ -1961,7 +1961,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi,
* avoid defragment running in SSR mode when free section are allocated
* intensively
*/
if (has_not_enough_free_secs(sbi, sec_num)) {
if (has_not_enough_free_secs(sbi, 0, sec_num)) {
err = -EAGAIN;
goto out;
}