This is a note to let you know that I've just added the patch titled ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ext4-destroy-ext4_fc_dentry_cachep-kmemcache-on-module-removal.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ab047d516dea72f011c15c04a929851e4d053109 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Date: Thu, 23 Dec 2021 17:44:36 +0100 Subject: ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> commit ab047d516dea72f011c15c04a929851e4d053109 upstream. The kmemcache for ext4_fc_dentry_cachep remains registered after module removal. Destroy ext4_fc_dentry_cachep kmemcache on module removal. Fixes: aa75f4d3daaeb ("ext4: main fast-commit commit path") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx> Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx> Link: https://lore.kernel.org/r/20211110134640.lyku5vklvdndw6uk@xxxxxxxxxxxxx Link: https://lore.kernel.org/r/YbiK3JetFFl08bd7@xxxxxxxxxxxxx Link: https://lore.kernel.org/r/20211223164436.2628390-1-bigeasy@xxxxxxxxxxxxx Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Cc: stable@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/ext4.h | 1 + fs/ext4/fast_commit.c | 5 +++++ fs/ext4/super.c | 2 ++ 3 files changed, 8 insertions(+) --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2934,6 +2934,7 @@ bool ext4_fc_replay_check_excluded(struc void ext4_fc_replay_cleanup(struct super_block *sb); int ext4_fc_commit(journal_t *journal, tid_t commit_tid); int __init ext4_fc_init_dentry_cache(void); +void ext4_fc_destroy_dentry_cache(void); /* mballoc.c */ extern const struct seq_operations ext4_mb_seq_groups_ops; --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -2188,3 +2188,8 @@ int __init ext4_fc_init_dentry_cache(voi return 0; } + +void ext4_fc_destroy_dentry_cache(void) +{ + kmem_cache_destroy(ext4_fc_dentry_cachep); +} --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6653,6 +6653,7 @@ static int __init ext4_init_fs(void) out: unregister_as_ext2(); unregister_as_ext3(); + ext4_fc_destroy_dentry_cache(); out05: destroy_inodecache(); out1: @@ -6679,6 +6680,7 @@ static void __exit ext4_exit_fs(void) unregister_as_ext2(); unregister_as_ext3(); unregister_filesystem(&ext4_fs_type); + ext4_fc_destroy_dentry_cache(); destroy_inodecache(); ext4_exit_mballoc(); ext4_exit_sysfs(); Patches currently in stable-queue which might be from bigeasy@xxxxxxxxxxxxx are queue-5.15/ext4-destroy-ext4_fc_dentry_cachep-kmemcache-on-module-removal.patch