six locks: Wakeup now takes lock on behalf of waiter
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 26 Aug 2022 23:22:24 +0000 (19:22 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:41 +0000 (17:09 -0400)
commit84a37cbf62e04480607ddd1940e3d8ce65b3828d
tree1a06e51f22ac15df4105a65d20836aadeab8507d
parente4b7254c754b676a6f4d607fd92cd71d221ff130
six locks: Wakeup now takes lock on behalf of waiter

This brings back an important optimization, to avoid touching the wait
lists an extra time, while preserving the property that a thread is on a
lock waitlist iff it is waiting - it is never removed from the waitlist
until it has the lock.

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