aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/six.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-05-21 16:38:09 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:10:01 -0400
commit0157f9c5a7c77b1cb89756351929dba4b28d5f75 (patch)
tree0ca2ecb5482986803a74c25cabec5e4bcff46643 /fs/bcachefs/six.c
parentsix locks: Kill six_lock_pcpu_(alloc|free) (diff)
downloadlinux-0157f9c5a7c77b1cb89756351929dba4b28d5f75.tar.gz
linux-0157f9c5a7c77b1cb89756351929dba4b28d5f75.tar.bz2
linux-0157f9c5a7c77b1cb89756351929dba4b28d5f75.zip
six locks: Remove hacks for percpu mode lost wakeup
The lost wakeup bug hasn't been observed in awhile, and we're trying to provoke it and determine if it still exists. This patch removes some defenses that were added to attempt to track it down; if it still exists, this should make it easier to see it. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/six.c')
-rw-r--r--fs/bcachefs/six.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/bcachefs/six.c b/fs/bcachefs/six.c
index f75387b9da88..32ad545ba570 100644
--- a/fs/bcachefs/six.c
+++ b/fs/bcachefs/six.c
@@ -144,17 +144,8 @@ static int __do_six_trylock_type(struct six_lock *lock,
* lock, issue a wakeup because we might have caused a
* spurious trylock failure:
*/
-#if 0
- /*
- * This code should be sufficient, but we're seeing unexplained
- * lost wakeups:
- */
if (old.write_locking)
ret = -1 - SIX_LOCK_write;
-#else
- if (!ret)
- ret = -1 - SIX_LOCK_write;
-#endif
} else if (type == SIX_LOCK_write && lock->readers) {
if (try) {
atomic64_add(__SIX_VAL(write_locking, 1),
@@ -332,7 +323,7 @@ static bool __six_relock_type(struct six_lock *lock, enum six_lock_type type,
*/
if (ret)
six_acquire(&lock->dep_map, 1, type == SIX_LOCK_read, ip);
- else
+ else if (old.write_locking)
six_lock_wakeup(lock, old, SIX_LOCK_write);
return ret;