summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorJaegeuk Kim2015-02-11 01:44:29 +0100
committerJaegeuk Kim2015-02-12 02:04:50 +0100
commit60a3b782b1aaf6e5f8c4f92e99302c48a26d475b (patch)
tree3a055e1b9ab2067437c27d7938ebf32de2de8bd6 /fs/f2fs/debug.c
parentf2fs: fix sparse warnings (diff)
downloadkernel-qcow2-linux-60a3b782b1aaf6e5f8c4f92e99302c48a26d475b.tar.gz
kernel-qcow2-linux-60a3b782b1aaf6e5f8c4f92e99302c48a26d475b.tar.xz
kernel-qcow2-linux-60a3b782b1aaf6e5f8c4f92e99302c48a26d475b.zip
f2fs: avoid variable length array
Instead of using variable length array, this patch let preallocate memory for them. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r--fs/f2fs/debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index ac2bd8e7eca9..e671373cc8ab 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -142,6 +142,7 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
si->base_mem += MAIN_SEGS(sbi) * sizeof(struct seg_entry);
si->base_mem += f2fs_bitmap_size(MAIN_SEGS(sbi));
si->base_mem += 2 * SIT_VBLOCK_MAP_SIZE * MAIN_SEGS(sbi);
+ si->base_mem += SIT_VBLOCK_MAP_SIZE;
if (sbi->segs_per_sec > 1)
si->base_mem += MAIN_SECS(sbi) * sizeof(struct sec_entry);
si->base_mem += __bitmap_size(sbi, SIT_BITMAP);