diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-03-07 23:14:35 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:17 -0400 |
commit | db6447b383e5299e864826a3adc29b5eca04f4c5 (patch) | |
tree | 067b8a42a6148b2ce54952246752046a14bdea6e /fs/bcachefs/journal.c | |
parent | 812af308de34f5bc3fc0d30a00f826ad159a724f (diff) | |
download | lwn-db6447b383e5299e864826a3adc29b5eca04f4c5.tar.gz lwn-db6447b383e5299e864826a3adc29b5eca04f4c5.zip |
bcachefs: fix a faulty assertion
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal.c')
-rw-r--r-- | fs/bcachefs/journal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 0aae8fd74c8a..64f9c5740ec8 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -248,13 +248,13 @@ static int journal_entry_open(struct journal *j) do { old.v = new.v = v; - EBUG_ON(journal_state_count(new, new.idx)); - if (old.cur_entry_offset == JOURNAL_ENTRY_ERROR_VAL) return -EROFS; /* Handle any already added entries */ new.cur_entry_offset = le32_to_cpu(buf->data->u64s); + + EBUG_ON(journal_state_count(new, new.idx)); journal_state_inc(&new); } while ((v = atomic64_cmpxchg(&j->reservations.counter, old.v, new.v)) != old.v); |