“d08caf9fa501b029be8668b46357a4af9db6d12c”上不存在“src/tsdb/git@gitcode.net:taosdata/tdengine.git”
提交 2ef3716f 编写于 作者: S Sebastian Andrzej Siewior 提交者: Zheng Zengkai

ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal

stable inclusion
from stable-v5.10.94
commit d60e9daba29e44e0f277333e46fff90c74509398
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d60e9daba29e44e0f277333e46fff90c74509398

--------------------------------

commit ab047d51 upstream.

The kmemcache for ext4_fc_dentry_cachep remains registered after module
removal.

Destroy ext4_fc_dentry_cachep kmemcache on module removal.

Fixes: aa75f4d3 ("ext4: main fast-commit commit path")
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: NLukas Czerner <lczerner@redhat.com>
Reviewed-by: NHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20211110134640.lyku5vklvdndw6uk@linutronix.de
Link: https://lore.kernel.org/r/YbiK3JetFFl08bd7@linutronix.de
Link: https://lore.kernel.org/r/20211223164436.2628390-1-bigeasy@linutronix.deSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 247be513
...@@ -2808,6 +2808,7 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t block); ...@@ -2808,6 +2808,7 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t block);
void ext4_fc_replay_cleanup(struct super_block *sb); void ext4_fc_replay_cleanup(struct super_block *sb);
int ext4_fc_commit(journal_t *journal, tid_t commit_tid); int ext4_fc_commit(journal_t *journal, tid_t commit_tid);
int __init ext4_fc_init_dentry_cache(void); int __init ext4_fc_init_dentry_cache(void);
void ext4_fc_destroy_dentry_cache(void);
/* mballoc.c */ /* mballoc.c */
extern const struct seq_operations ext4_mb_seq_groups_ops; extern const struct seq_operations ext4_mb_seq_groups_ops;
......
...@@ -2169,3 +2169,8 @@ int __init ext4_fc_init_dentry_cache(void) ...@@ -2169,3 +2169,8 @@ int __init ext4_fc_init_dentry_cache(void)
return 0; return 0;
} }
void ext4_fc_destroy_dentry_cache(void)
{
kmem_cache_destroy(ext4_fc_dentry_cachep);
}
...@@ -6830,6 +6830,7 @@ static int __init ext4_init_fs(void) ...@@ -6830,6 +6830,7 @@ static int __init ext4_init_fs(void)
out: out:
unregister_as_ext2(); unregister_as_ext2();
unregister_as_ext3(); unregister_as_ext3();
ext4_fc_destroy_dentry_cache();
out05: out05:
destroy_inodecache(); destroy_inodecache();
out1: out1:
...@@ -6856,6 +6857,7 @@ static void __exit ext4_exit_fs(void) ...@@ -6856,6 +6857,7 @@ static void __exit ext4_exit_fs(void)
unregister_as_ext2(); unregister_as_ext2();
unregister_as_ext3(); unregister_as_ext3();
unregister_filesystem(&ext4_fs_type); unregister_filesystem(&ext4_fs_type);
ext4_fc_destroy_dentry_cache();
destroy_inodecache(); destroy_inodecache();
ext4_exit_mballoc(); ext4_exit_mballoc();
ext4_exit_sysfs(); ext4_exit_sysfs();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册