aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/six.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-06-16 15:56:42 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:10:02 -0400
commit32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf (patch)
treeaf06267093004fd58dc0e639842e0fb4575d5614 /fs/bcachefs/six.c
parentsix locks: Split out seq, use atomic_t instead of atomic64_t (diff)
downloadlinux-32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf.tar.gz
linux-32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf.tar.bz2
linux-32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf.zip
six locks: Seq now only incremented on unlock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/six.c')
-rw-r--r--fs/bcachefs/six.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/bcachefs/six.c b/fs/bcachefs/six.c
index 54e4aa35a350..8ce0998b9775 100644
--- a/fs/bcachefs/six.c
+++ b/fs/bcachefs/six.c
@@ -302,9 +302,6 @@ bool six_trylock_ip(struct six_lock *lock, enum six_lock_type type, unsigned lon
if (type != SIX_LOCK_write)
six_acquire(&lock->dep_map, 1, type == SIX_LOCK_read, ip);
- else
- lock->seq++;
-
return true;
}
EXPORT_SYMBOL_GPL(six_trylock_ip);
@@ -596,8 +593,6 @@ int six_lock_ip_waiter(struct six_lock *lock, enum six_lock_type type,
ret = do_six_trylock(lock, type, true) ? 0
: six_lock_slowpath(lock, type, wait, should_sleep_fn, p, ip);
- lock->seq += !ret && type == SIX_LOCK_write;
-
if (ret && type != SIX_LOCK_write)
six_release(&lock->dep_map, ip);
if (!ret)