bcachefs: six locks: Simplify optimistic spinning
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 31 Oct 2023 01:03:32 +0000 (21:03 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:38 +0000 (11:47 -0500)
commit011173321f6fb36f47c3aaaf04218bf758b29e17
tree139d8ac4fde351e503d87251c67e5f2083d5b671
parentee841b77b3bfc3443112b1be53ca23d522b82333
bcachefs: six locks: Simplify optimistic spinning

osq lock maintainers don't want it to be used outside of kernel/locking/
- but, we can do better.

Since we have lock handoff signalled via waitlist entries, there's no
reason for optimistic spinning to have to look at the lock at all -
aside from checking lock-owner; we can just spin looking at our waitlist
entry.

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