All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal.
@ 2021-11-10 13:46 Sebastian Andrzej Siewior
  2021-11-22 11:36 ` Sebastian Andrzej Siewior
  2021-11-29 11:28 ` Lukas Czerner
  0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-11-10 13:46 UTC (permalink / raw)
  To: linux-ext4; +Cc: Theodore Ts'o, Andreas Dilger, Thomas Gleixner

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@linutronix.de>
---
 fs/ext4/ext4.h        | 1 +
 fs/ext4/fast_commit.c | 5 +++++
 fs/ext4/super.c       | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 3825195539d74..c97860ef322db 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2934,6 +2934,7 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t block);
 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;
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index 8ea5a81e65548..1a43af302ecba 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -2185,3 +2185,8 @@ int __init ext4_fc_init_dentry_cache(void)
 
 	return 0;
 }
+
+void ext4_fc_destroy_dentry_cache(void)
+{
+	kmem_cache_destroy(ext4_fc_dentry_cachep);
+}
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 88d5d274a8684..eb2dfc2a19d33 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -6641,6 +6641,7 @@ static int __init ext4_init_fs(void)
 out:
 	unregister_as_ext2();
 	unregister_as_ext3();
+	ext4_fc_destroy_dentry_cache();
 out05:
 	destroy_inodecache();
 out1:
@@ -6667,6 +6668,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();
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal.
  2021-11-10 13:46 [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal Sebastian Andrzej Siewior
@ 2021-11-22 11:36 ` Sebastian Andrzej Siewior
  2021-11-29 11:28 ` Lukas Czerner
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-11-22 11:36 UTC (permalink / raw)
  To: linux-ext4; +Cc: Theodore Ts'o, Andreas Dilger, Thomas Gleixner

On 2021-11-10 14:46:43 [+0100], To linux-ext4@vger.kernel.org wrote:
> 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@linutronix.de>

ping ;)

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal.
  2021-11-10 13:46 [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal Sebastian Andrzej Siewior
  2021-11-22 11:36 ` Sebastian Andrzej Siewior
@ 2021-11-29 11:28 ` Lukas Czerner
  1 sibling, 0 replies; 3+ messages in thread
From: Lukas Czerner @ 2021-11-29 11:28 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-ext4, Theodore Ts'o, Andreas Dilger, Thomas Gleixner

On Wed, Nov 10, 2021 at 02:46:40PM +0100, Sebastian Andrzej Siewior wrote:
> The kmemcache for ext4_fc_dentry_cachep remains registered after module
> removal.
> 
> Destroy ext4_fc_dentry_cachep kmemcache on module removal.

Thanks! It looks good to me.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

> 
> Fixes: aa75f4d3daaeb ("ext4: main fast-commit commit path")
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  fs/ext4/ext4.h        | 1 +
>  fs/ext4/fast_commit.c | 5 +++++
>  fs/ext4/super.c       | 2 ++
>  3 files changed, 8 insertions(+)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 3825195539d74..c97860ef322db 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -2934,6 +2934,7 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t block);
>  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;
> diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
> index 8ea5a81e65548..1a43af302ecba 100644
> --- a/fs/ext4/fast_commit.c
> +++ b/fs/ext4/fast_commit.c
> @@ -2185,3 +2185,8 @@ int __init ext4_fc_init_dentry_cache(void)
>  
>  	return 0;
>  }
> +
> +void ext4_fc_destroy_dentry_cache(void)
> +{
> +	kmem_cache_destroy(ext4_fc_dentry_cachep);
> +}
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 88d5d274a8684..eb2dfc2a19d33 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -6641,6 +6641,7 @@ static int __init ext4_init_fs(void)
>  out:
>  	unregister_as_ext2();
>  	unregister_as_ext3();
> +	ext4_fc_destroy_dentry_cache();
>  out05:
>  	destroy_inodecache();
>  out1:
> @@ -6667,6 +6668,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();
> -- 
> 2.33.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-29 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 13:46 [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal Sebastian Andrzej Siewior
2021-11-22 11:36 ` Sebastian Andrzej Siewior
2021-11-29 11:28 ` Lukas Czerner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.