Re: [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests

From
Theodore Ts'o <tytso@mit.edu>
Date
2021-07-02 13:13:50
Also in
linux-fsdevel, linuxppc-dev
Reply to
Guoqing Jiang, 2021-07-02
On Fri, Jul 02, 2021 at 05:38:10PM +0800, Guoqing Jiang wrote:
quoted hunk ↗ jump to hunk

I guess the problem is j_jh_shrink_count was destroyed in ext4_put_super _> 
jbd2_journal_unregister_shrinker
which is before the path ext4_put_super -> jbd2_journal_destroy ->
jbd2_log_do_checkpoint to call
percpu_counter_dec(&journal->j_jh_shrink_count).

And since jbd2_journal_unregister_shrinker is already called inside
jbd2_journal_destroy, does it make sense
to do this?
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1176,7 +1176,6 @@ static void ext4_put_super(struct super_block *sb)
        ext4_unregister_sysfs(sb);

        if (sbi->s_journal) {
-               jbd2_journal_unregister_shrinker(sbi->s_journal);
                aborted = is_journal_aborted(sbi->s_journal);
                err = jbd2_journal_destroy(sbi->s_journal);
                sbi->s_journal = NULL;
Good catch.  There's another place where we call
jbd2_journal_unregister_shrinker(), in the failure path for
ext4_fill_super().

					- Ted

P.S.  Whatever outgoing mailer you are using, it's not preserving TAB
characters correctly.  You might want to look into that before trying
to submit a patch.
Thread (19 messages) 19 messages, 6 authors, last reply 2021-07-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help