bcachefs: Mark bch_inode_info as SLAB_ACCOUNT

After commit 230e9fc286 ("slab: add SLAB_ACCOUNT flag"), we need to mark
the inode cache as SLAB_ACCOUNT, similar to commit 5d097056c9 ("kmemcg:
account for certain kmem allocations to memcg")

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Youling Tang 2024-07-03 15:09:55 +08:00 committed by Kent Overstreet
parent b02f973e67
commit 86d81ec5f5

View File

@ -2071,7 +2071,8 @@ int __init bch2_vfs_init(void)
{ {
int ret = -ENOMEM; int ret = -ENOMEM;
bch2_inode_cache = KMEM_CACHE(bch_inode_info, SLAB_RECLAIM_ACCOUNT); bch2_inode_cache = KMEM_CACHE(bch_inode_info, SLAB_RECLAIM_ACCOUNT |
SLAB_ACCOUNT);
if (!bch2_inode_cache) if (!bch2_inode_cache)
goto err; goto err;