diff options
| author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-02-02 09:53:15 -0500 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-02-11 17:15:02 -0500 |
| commit | b1f1daf8c72d615b64163e26488d8effeed29b60 (patch) | |
| tree | d623c3ed0808ea9c1f4bec9b388844aed6a30a1e /fs/f2fs | |
| parent | 5ac206cf4f9aad871aa1f1dd653a3404092db56c (diff) | |
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: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
| -rw-r--r-- | fs/f2fs/segment.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index a9417b94d6bc..458bf5c726f7 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h | |||
| @@ -464,10 +464,8 @@ static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi) | |||
| 464 | if (sbi->por_doing) | 464 | if (sbi->por_doing) |
| 465 | return false; | 465 | return false; |
| 466 | 466 | ||
| 467 | if (free_sections(sbi) <= (node_secs + 2 * dent_secs + | 467 | return (free_sections(sbi) <= (node_secs + 2 * dent_secs + |
| 468 | reserved_sections(sbi))) | 468 | reserved_sections(sbi))); |
| 469 | return true; | ||
| 470 | return false; | ||
| 471 | } | 469 | } |
| 472 | 470 | ||
| 473 | static inline int utilization(struct f2fs_sb_info *sbi) | 471 | static inline int utilization(struct f2fs_sb_info *sbi) |
