diff options
-rw-r--r-- | fs/bcachefs/journal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 801f09593e6b..43bb1d4002bd 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -162,6 +162,7 @@ void bch2_journal_halt(struct journal *j) __journal_entry_close(j, JOURNAL_ENTRY_ERROR_VAL); if (!j->err_seq) j->err_seq = journal_cur_seq(j); + journal_wake(j); spin_unlock(&j->lock); } @@ -362,6 +363,12 @@ retry: spin_lock(&j->lock); + /* check once more in case somebody else shut things down... */ + if (bch2_journal_error(j)) { + spin_unlock(&j->lock); + return -BCH_ERR_erofs_journal_err; + } + /* * Recheck after taking the lock, so we don't race with another thread * that just did journal_entry_open() and call journal_entry_close() |