* Re: [PATCH -v2] ext4: inline jbd2_journal_[un]register_shrinker()
[not found] ` <20210705145025.3363130-1-tytso@mit.edu>
@ 2021-07-05 18:29 ` Jon Hunter
0 siblings, 0 replies; only message in thread
From: Jon Hunter @ 2021-07-05 18:29 UTC (permalink / raw
To: Theodore Ts'o, Ext4 Developers List
Cc: Jan Kara, Zhang Yi, Sachin Sant, linux-tegra
On 05/07/2021 15:50, Theodore Ts'o wrote:
> The function jbd2_journal_unregister_shrinker() was getting called
> twice when the file system was getting unmounted. On Power and ARM
> platforms this was causing kernel crash when unmounting the file
> system, when a percpu_counter was destroyed twice.
>
> Fix this by removing jbd2_journal_[un]register_shrinker() functions,
> and inlining the shrinker setup and teardown into
> journal_init_common() and jbd2_journal_destroy(). This means that
> ext4 and ocfs2 now no longer need to know about registering and
> unregistering jbd2's shrinker.
>
> Also, while we're at it, rename the percpu counter from
> j_jh_shrink_count to j_checkpoint_jh_count, since this makes it
> clearer what this counter is intended to track.
>
> Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers")
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Reported-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
> Tested-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Thanks, works for me.
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Cheers
Jon
--
nvpublic
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-05 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3acc3ee6-3a3d-3b26-7580-b20955270913@huawei.com>
[not found] ` <20210705145025.3363130-1-tytso@mit.edu>
2021-07-05 18:29 ` [PATCH -v2] ext4: inline jbd2_journal_[un]register_shrinker() Jon Hunter
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 read-only IMAP folder(s) and NNTP newsgroup(s).