From: Harshad Shirwadkar Date: Fri, 6 Nov 2020 03:59:10 +0000 (-0800) Subject: jbd2: don't start fast commit on aborted journal X-Git-Tag: v5.10.7~1198^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87a144f09380152d28352ecbcc4c65874e7eb892;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/20201106035911.1942128-22-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index f7ebf6e..0c3d5e3 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -727,6 +727,8 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid) */ int jbd2_fc_begin_commit(journal_t *journal, tid_t tid) { + if (unlikely(is_journal_aborted(journal))) + return -EIO; /* * Fast commits only allowed if at least one full commit has * been processed.