six locks: Fix a lost wakeup
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 15 Oct 2022 04:34:38 +0000 (00:34 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:41 +0000 (17:09 -0400)
commite4b7254c754b676a6f4d607fd92cd71d221ff130
treefb1316ac3a0b89173514151e27580cd823366c38
parent5b254da5733d9b8c6a13073fecc506c2861aaeb2
six locks: Fix a lost wakeup

There was a lost wakeup between a read unlock in percpu mode and a write
lock. The unlock path unlocks, then executes a barrier, then checks for
waiters; correspondingly, the lock side should set the wait bit and
execute a barrier, then attempt to take the lock.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/six.c