From: Kinglong Mee Date: Sat, 18 Mar 2017 01:25:05 +0000 (+0800) Subject: f2fs: calculate the f2fs_stat_info into base_mem X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70874fb34fbd8b34b1aa45b30ca7eb216b1376d4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: calculate the f2fs_stat_info into base_mem The memory size of f2fs_stat_info also should be calculated. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index ee2d0a485fc3..ef1179df05d9 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -156,7 +156,11 @@ static void update_mem_info(struct f2fs_sb_info *sbi) if (si->base_mem) goto get_cache; - si->base_mem = sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize; + /* build stat */ + si->base_mem = sizeof(struct f2fs_stat_info); + + /* build superblock */ + si->base_mem += sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize; si->base_mem += 2 * sizeof(struct f2fs_inode_info); si->base_mem += sizeof(*sbi->ckpt); si->base_mem += sizeof(struct percpu_counter) * NR_COUNT_TYPE;