diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-27 06:53:46 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-29 04:58:22 +0100 |
commit | ef0beeb8dd343a57cf8ad4967b508b8e7452f347 (patch) | |
tree | 24a9ccb7ad81b53b948a71cc7a4205376a9c7af2 /fs/bcachefs/journal.c | |
parent | bcachefs: -EROFS doesn't count as move_extent_start_fail (diff) | |
download | linux-ef0beeb8dd343a57cf8ad4967b508b8e7452f347.tar.xz linux-ef0beeb8dd343a57cf8ad4967b508b8e7452f347.zip |
bcachefs: move journal seq assertion
journal_cur_seq() can legitimately be used outside of the journal lock,
where this assert can race
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal.c')
-rw-r--r-- | fs/bcachefs/journal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 23a9b7845d11..489b34046e78 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -321,6 +321,8 @@ static int journal_entry_open(struct journal *j) atomic64_inc(&j->seq); journal_pin_list_init(fifo_push_ref(&j->pin), 1); + BUG_ON(j->pin.back - 1 != atomic64_read(&j->seq)); + BUG_ON(j->buf + (journal_cur_seq(j) & JOURNAL_BUF_MASK) != buf); bkey_extent_init(&buf->key); |