提交 b1f1daf8 编写于 作者: N Namjae Jeon 提交者: Jaegeuk Kim

f2fs: optimize the return condition for has_not_enough_free_secs

Instead of evaluating the free_sections and then deciding to return
true/false from that path. We can directly use the evaluation condition
for returning proper value.
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NAmit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
上级 5ac206cf
......@@ -464,10 +464,8 @@ static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi)
if (sbi->por_doing)
return false;
if (free_sections(sbi) <= (node_secs + 2 * dent_secs +
reserved_sections(sbi)))
return true;
return false;
return (free_sections(sbi) <= (node_secs + 2 * dent_secs +
reserved_sections(sbi)));
}
static inline int utilization(struct f2fs_sb_info *sbi)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册