From: Namjae Jeon <[email protected]>

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 <[email protected]>
Signed-off-by: Amit Sahrawat <[email protected]>
---
 fs/f2fs/segment.h |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index a9417b9..458bf5c 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)
        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)
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to