Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70874fb3 authored by Kinglong Mee's avatar Kinglong Mee Committed by Jaegeuk Kim
Browse files

f2fs: calculate the f2fs_stat_info into base_mem



The memory size of f2fs_stat_info also should be calculated.

Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 684ca7e5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;