Skip to content

Commit 87a144f

Browse files
harshadjstytso
authored andcommitted
jbd2: don't start fast commit on aborted journal
Fast commit should not be started if the journal is aborted. Signed-off-by: Harshad Shirwadkar<harshadshirwadkar@gmail.com> Link: https://lore.kernel.org/r/20201106035911.1942128-22-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 9b5f6c9 commit 87a144f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/jbd2/journal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
727727
*/
728728
int jbd2_fc_begin_commit(journal_t *journal, tid_t tid)
729729
{
730+
if (unlikely(is_journal_aborted(journal)))
731+
return -EIO;
730732
/*
731733
* Fast commits only allowed if at least one full commit has
732734
* been processed.

0 commit comments

Comments
 (0)