Re: [PATCH 1/2] bcachefs: Add missing smp_rmb()

2025-04-04 Thread Kent Overstreet
On Tue, Mar 18, 2025 at 03:50:00PM +0800, Alan Huang wrote: > The smp_rmb() guarantees that reads from reservations.counter > occur before accessing cur_entry_u64s. It's paired with the > atomic64_try_cmpxchg in journal_entry_open. > > Signed-off-by: Alan Huang It would also work to recheck j->c

[PATCH 1/2] bcachefs: Add missing smp_rmb()

2025-03-18 Thread Alan Huang
The smp_rmb() guarantees that reads from reservations.counter occur before accessing cur_entry_u64s. It's paired with the atomic64_try_cmpxchg in journal_entry_open. Signed-off-by: Alan Huang --- fs/bcachefs/journal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/bcac