linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: harshad shirwadkar <harshadshirwadkar@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Lukas Czerner <lczerner@redhat.com>
Subject: Re: [PATCH REPOST] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal.
Date: Fri, 17 Dec 2021 12:20:18 -0800	[thread overview]
Message-ID: <CAD+ocbzQLgjeQz6Sz7YGF45=P0nqLTYh8XBsc_OjQirrjFOLeg@mail.gmail.com> (raw)
In-Reply-To: <YbiK3JetFFl08bd7@linutronix.de>

Thanks Sebastian for the patch, it looks good.

Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>

On Tue, Dec 14, 2021 at 9:35 AM Sebastian Andrzej Siewior
<bigeasy@linutronix.de> 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>
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> Link: https://lore.kernel.org/r/20211110134640.lyku5vklvdndw6uk@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 404dd50856e5d..af7088085d4e4 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -2935,6 +2935,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 0f32b445582ab..4665508efd778 100644
> --- a/fs/ext4/fast_commit.c
> +++ b/fs/ext4/fast_commit.c
> @@ -2192,3 +2192,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 4e33b5eca694d..71185a217d05b 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -6649,6 +6649,7 @@ static int __init ext4_init_fs(void)
>  out:
>         unregister_as_ext2();
>         unregister_as_ext3();
> +       ext4_fc_destroy_dentry_cache();
>  out05:
>         destroy_inodecache();
>  out1:
> @@ -6675,6 +6676,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.34.1
>

      reply	other threads:[~2021-12-17 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 12:15 [PATCH REPOST] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal Sebastian Andrzej Siewior
2021-12-17 20:20 ` harshad shirwadkar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD+ocbzQLgjeQz6Sz7YGF45=P0nqLTYh8XBsc_OjQirrjFOLeg@mail.gmail.com' \
    --to=harshadshirwadkar@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=bigeasy@linutronix.de \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).