It is not efficient comparing each segment type to find node or data. Signed-off-by: Changman Lee <cm224.lee@xxxxxxxxxxx> --- 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 269f690..4ace569 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -21,12 +21,10 @@ #define GET_R2L_SEGNO(free_i, segno) (segno + free_i->start_segno) #define IS_DATASEG(t) \ - ((t == CURSEG_HOT_DATA) || (t == CURSEG_COLD_DATA) || \ - (t == CURSEG_WARM_DATA)) + (t <= CURSEG_COLD_DATA) #define IS_NODESEG(t) \ - ((t == CURSEG_HOT_NODE) || (t == CURSEG_COLD_NODE) || \ - (t == CURSEG_WARM_NODE)) + (t >= CURSEG_HOT_NODE) #define IS_CURSEG(sbi, seg) \ ((seg == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno) || \ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html