]> www.infradead.org Git - users/hch/misc.git/commit
bcachefs: Fix incorrect state count
authorAlan Huang <mmpgouride@gmail.com>
Mon, 17 Mar 2025 17:54:24 +0000 (01:54 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 24 Mar 2025 13:50:35 +0000 (09:50 -0400)
commit5cc0ab39fb16c44ef6bbabb1b5a0c5705ec0bb56
treea989d3b250f12e4937d20c303471fd4fa6dca09c
parent16a8d5d00b8add42924185c30f7cefdbb156fdd4
bcachefs: Fix incorrect state count

atomic64_read(&j->seq) - j->seq_write_started == JOURNAL_STATE_BUF_NR is
the condition in journal_entry_open where we return JOURNAL_ERR_max_open,
so journal_cur_seq(j) - seq == JOURNAL_STATE_BUF_NR means that the buf
corresponding to seq has started to write.

Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.h