summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@kylinos.cn>2024-07-03 09:09:55 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-09 15:41:47 +0200
commit094c6a9f5cd567e9fe0e9f0616157a7e6369566e (patch)
tree262e54d78c5d972a1a8fc48228789227b20b0b76
parentbcachefs: allocate inode by using alloc_inode_sb() (diff)
downloadlinux-094c6a9f5cd567e9fe0e9f0616157a7e6369566e.tar.xz
linux-094c6a9f5cd567e9fe0e9f0616157a7e6369566e.zip
bcachefs: Mark bch_inode_info as SLAB_ACCOUNT
After commit 230e9fc28604 ("slab: add SLAB_ACCOUNT flag"), we need to mark the inode cache as SLAB_ACCOUNT, similar to commit 5d097056c9a0 ("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>
-rw-r--r--fs/bcachefs/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index cb71d05a32bc..d90b3082a86f 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -2236,7 +2236,8 @@ int __init bch2_vfs_init(void)
{
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)
goto err;