summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorChao Yu2018-10-24 12:37:26 +0200
committerJaegeuk Kim2018-11-27 00:53:55 +0100
commit2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b (patch)
treeedc61ac95eca64a9903e8926f790954e147902b4 /fs/f2fs/debug.c
parentf2fs: clean up f2fs_sb_has_##feature_name (diff)
downloadkernel-qcow2-linux-2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b.tar.gz
kernel-qcow2-linux-2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b.tar.xz
kernel-qcow2-linux-2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b.zip
f2fs: introduce __is_large_section() for cleanup
Introduce a wrapper __is_large_section() to clean up codes. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r--fs/f2fs/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 139b4d5c83d5..e327eefdbc02 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -197,7 +197,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
si->base_mem += 2 * SIT_VBLOCK_MAP_SIZE * MAIN_SEGS(sbi);
si->base_mem += SIT_VBLOCK_MAP_SIZE * MAIN_SEGS(sbi);
si->base_mem += SIT_VBLOCK_MAP_SIZE;
- if (sbi->segs_per_sec > 1)
+ if (__is_large_section(sbi))
si->base_mem += MAIN_SECS(sbi) * sizeof(struct sec_entry);
si->base_mem += __bitmap_size(sbi, SIT_BITMAP);