Skip to content

Commit d0a186e

Browse files
zhangyi089tytso
authored andcommitted
jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record
We invoke jbd2_journal_abort() to abort the journal and record errno in the jbd2 superblock when committing journal transaction besides the failure on submitting the commit record. But there is no need for the case and we can also invoke jbd2_journal_abort() instead of __jbd2_journal_abort_hard(). Fixes: 818d276 ("ext4: Add the journal checksum feature") Signed-off-by: zhangyi (F) <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 1a8e9cf commit d0a186e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/jbd2/commit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
782782
err = journal_submit_commit_record(journal, commit_transaction,
783783
&cbh, crc32_sum);
784784
if (err)
785-
__jbd2_journal_abort_hard(journal);
785+
jbd2_journal_abort(journal, err);
786786
}
787787

788788
blk_finish_plug(&plug);
@@ -875,7 +875,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
875875
err = journal_submit_commit_record(journal, commit_transaction,
876876
&cbh, crc32_sum);
877877
if (err)
878-
__jbd2_journal_abort_hard(journal);
878+
jbd2_journal_abort(journal, err);
879879
}
880880
if (cbh)
881881
err = journal_wait_on_commit_record(journal, cbh);

0 commit comments

Comments
 (0)