android_kernel_google_msm/fs/jbd2
Jan Kara e1ae22abf3 jbd2: avoid infinite loop when destroying aborted journal
commit 841df7df196237ea63233f0f9eaa41db53afd70f upstream.

Commit 6f6a6fda2945 "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: 6f6a6fda294506dfe0e3e0a253bb2d2923f28f0a
Signed-off-by: Jan Kara <jack@suse.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-10-22 09:20:08 +08:00
..
checkpoint.c jbd2: avoid infinite loop when destroying aborted journal 2015-10-22 09:20:08 +08:00
commit.c jbd2: avoid infinite loop when destroying aborted journal 2015-10-22 09:20:08 +08:00
journal.c jbd2: avoid infinite loop when destroying aborted journal 2015-10-22 09:20:08 +08:00
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile
recovery.c jbd2: issue cache flush after checkpointing even with internal journal 2012-03-13 22:22:54 -04:00
revoke.c jbd2: use KMEM_CACHE instead of kmem_cache_create() 2012-02-20 17:53:03 -05:00
transaction.c jbd2: don't BUG but return ENOSPC if a handle runs out of space 2014-01-08 09:42:12 -08:00