summaryrefslogtreecommitdiff
path: root/fs/bcachefs/six.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-05-22 07:17:40 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:02 +0300
commit2804d0f15bda386fa86c7b6b432edb758e785bce (patch)
treee7302645de16845e5d9a77fd30b391590d9ea046 /fs/bcachefs/six.h
parenta4e9e1f0cb71dfceaca0d2088465af05a747c710 (diff)
downloadlinux-2804d0f15bda386fa86c7b6b432edb758e785bce.tar.xz
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.h5
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);