summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2019-06-20 10:42:08 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2019-07-02 18:40:41 -0400
commitf91108b801ad7d7668c95841f4cb76494b2a9c8a (patch)
tree54d815eab17ed49dc3d784c2da87f54a771b1115 /fs/f2fs/segment.h
parent2d821c12176bc1184701d548c987b2e2a39429ed (diff)
f2fs: Use DIV_ROUND_UP() instead of open-coding
Replace the open-coded divisions with round-up by calls to the DIV_ROUND_UP() helper macro. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 166ac0f07a4e..2ae6df03b998 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -109,7 +109,7 @@
109#define START_SEGNO(segno) \ 109#define START_SEGNO(segno) \
110 (SIT_BLOCK_OFFSET(segno) * SIT_ENTRY_PER_BLOCK) 110 (SIT_BLOCK_OFFSET(segno) * SIT_ENTRY_PER_BLOCK)
111#define SIT_BLK_CNT(sbi) \ 111#define SIT_BLK_CNT(sbi) \
112 ((MAIN_SEGS(sbi) + SIT_ENTRY_PER_BLOCK - 1) / SIT_ENTRY_PER_BLOCK) 112 DIV_ROUND_UP(MAIN_SEGS(sbi), SIT_ENTRY_PER_BLOCK)
113#define f2fs_bitmap_size(nr) \ 113#define f2fs_bitmap_size(nr) \
114 (BITS_TO_LONGS(nr) * sizeof(unsigned long)) 114 (BITS_TO_LONGS(nr) * sizeof(unsigned long))
115 115