Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

f2fs: fix to show ino management cache size correctly

It needs to stat size of ino management cache with all type instead of
orphan ino type.

Fixes: 652be55162dc ("f2fs: show # of orphan inodes")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
b77061bf 3f06252f

+1 -1
+1 -1
fs/f2fs/debug.c
··· 240 240 si->cache_mem += NM_I(sbi)->dirty_nat_cnt * 241 241 sizeof(struct nat_entry_set); 242 242 si->cache_mem += si->inmem_pages * sizeof(struct inmem_pages); 243 - for (i = 0; i <= ORPHAN_INO; i++) 243 + for (i = 0; i < MAX_INO_ENTRY; i++) 244 244 si->cache_mem += sbi->im[i].ino_num * sizeof(struct ino_entry); 245 245 si->cache_mem += atomic_read(&sbi->total_ext_tree) * 246 246 sizeof(struct extent_tree);