Skip to content
Commit b01684ed authored by Jan Kara's avatar Jan Kara Committed by Greg Kroah-Hartman
Browse files

jbd2: avoid infinite loop when destroying aborted journal

commit 841df7df upstream.

Commit 6f6a6fda

 "jbd2: fix ocfs2 corrupt when updating journal
superblock fails" changed jbd2_cleanup_journal_tail() to return EIO
when the journal is aborted. That makes logic in
jbd2_log_do_checkpoint() bail out which is fine, except that
jbd2_journal_destroy() expects jbd2_log_do_checkpoint() to always make
a progress in cleaning the journal. Without it jbd2_journal_destroy()
just loops in an infinite loop.

Fix jbd2_journal_destroy() to cleanup journal checkpoint lists of
jbd2_log_do_checkpoint() fails with error.

Reported-by: default avatarEryu Guan <guaneryu@gmail.com>
Tested-by: default avatarEryu Guan <guaneryu@gmail.com>
Fixes: 6f6a6fda


Signed-off-by: default avatarJan Kara <jack@suse.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a116acdf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment