summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-12-26 02:40:15 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:19 +0300
commit4141fde0be05beb529ee6433b9808f815254901b (patch)
treedad1b32885b9ae4c9978b564e5599de1a6114256 /fs/bcachefs/journal_io.c
parente75b2d4c1c829142f8e3e64a9b3cf7faedcfb640 (diff)
downloadlinux-4141fde0be05beb529ee6433b9808f815254901b.tar.xz
bcachefs: Fix bch2_journal_meta()
This patch ensures that the journal entry written gets written as flush entry, which is important for the shutdown path - the last entry written needs to be a flush entry. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index ae28cee127e3..bda605095825 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -1445,7 +1445,7 @@ void bch2_journal_write(struct closure *cl)
SET_JSET_BIG_ENDIAN(jset, CPU_BIG_ENDIAN);
SET_JSET_CSUM_TYPE(jset, bch2_meta_checksum_type(c));
- if (journal_entry_empty(jset))
+ if (!JSET_NO_FLUSH(jset) && journal_entry_empty(jset))
j->last_empty_seq = le64_to_cpu(jset->seq);
if (bch2_csum_type_is_encryption(JSET_CSUM_TYPE(jset)))