summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorHarshad Shirwadkar <harshadshirwadkar@gmail.com>2020-11-05 19:59:10 -0800
committerTheodore Ts'o <tytso@mit.edu>2020-11-06 23:01:06 -0500
commit87a144f09380152d28352ecbcc4c65874e7eb892 (patch)
tree3e3846f6d2efc7bfbd6bd24b0bd11f5087bbd760 /fs
parent9b5f6c9b83d912c63ef9fb486a052be79b06f8b0 (diff)
downloadlinux-87a144f09380152d28352ecbcc4c65874e7eb892.tar.gz
linux-87a144f09380152d28352ecbcc4c65874e7eb892.tar.bz2
linux-87a144f09380152d28352ecbcc4c65874e7eb892.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/jbd2/journal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index f7ebf6ef69af..0c3d5e3b24b2 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.