diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-05-22 00:17:40 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:02 -0400 |
commit | 2804d0f15bda386fa86c7b6b432edb758e785bce (patch) | |
tree | e7302645de16845e5d9a77fd30b391590d9ea046 /fs/bcachefs/six.h | |
parent | a4e9e1f0cb71dfceaca0d2088465af05a747c710 (diff) | |
download | linux-2804d0f15bda386fa86c7b6b432edb758e785bce.tar.gz linux-2804d0f15bda386fa86c7b6b432edb758e785bce.tar.bz2 linux-2804d0f15bda386fa86c7b6b432edb758e785bce.zip |
six locks: Split out seq, use atomic_t instead of atomic64_t
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/six.h')
-rw-r--r-- | fs/bcachefs/six.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/six.h b/fs/bcachefs/six.h index 82bf9de72490..4c268b0b8316 100644 --- a/fs/bcachefs/six.h +++ b/fs/bcachefs/six.h @@ -138,7 +138,8 @@ enum six_lock_type { }; struct six_lock { - atomic64_t state; + atomic_t state; + u32 seq; unsigned intent_lock_recurse; struct task_struct *owner; unsigned __percpu *readers; @@ -196,7 +197,7 @@ do { \ */ static inline u32 six_lock_seq(const struct six_lock *lock) { - return atomic64_read(&lock->state) >> 32; + return lock->seq; } bool six_trylock_ip(struct six_lock *lock, enum six_lock_type type, unsigned long ip); |