linux/fs/jbd2
Jan Kara ffb04e43c0 jbd2: avoid infinite loop when destroying aborted journal
[ Upstream commit 841df7df19 ]

Commit 6f6a6fda29 "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: Eryu Guan <guaneryu@gmail.com>
Tested-by: Eryu Guan <guaneryu@gmail.com>
Fixes: 6f6a6fda29
Signed-off-by: Jan Kara <jack@suse.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-11-13 13:14:15 -05:00
..
checkpoint.c jbd2: avoid infinite loop when destroying aborted journal 2015-11-13 13:14:15 -05:00
commit.c jbd2: avoid infinite loop when destroying aborted journal 2015-11-13 13:14:15 -05:00
journal.c jbd2: avoid infinite loop when destroying aborted journal 2015-11-13 13:14:15 -05:00
Kconfig jbd2: remove debug dependency on debug_fs and update Kconfig help text 2013-06-12 23:07:51 -04:00
Makefile [PATCH] jbd2: rename jbd2 symbols to avoid duplication of jbd symbols 2006-10-11 11:14:15 -07:00
recovery.c jbd2: fix r_count overflows leading to buffer overflow in journal recovery 2015-06-10 13:42:24 -04:00
revoke.c jbd2: fix r_count overflows leading to buffer overflow in journal recovery 2015-06-10 13:42:24 -04:00
transaction.c ext4: fix NULL pointer dereference when journal restart fails 2015-06-10 13:42:23 -04:00