bcachefs: bch2_mark_alloc(): Do wakeups after updating usage
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 18 Jul 2022 01:33:00 +0000 (21:33 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:36 +0000 (17:09 -0400)
commitf501ad2b8108a7910adf494fcc5c59bbbfa886e8
tree317f88e49c2158fc3613c303f8a18246598bf530
parentc807ca95a6e20bedbbb84287bc7087c2b2b775de
bcachefs: bch2_mark_alloc(): Do wakeups after updating usage

We have an obvious wake up race if we do the wakeup _before_ updating
the counters the thing doing the waiting is reading.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/buckets.c