Commit 2804d0f1 authored by Kent Overstreet's avatar Kent Overstreet

six locks: Split out seq, use atomic_t instead of atomic64_t

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a4e9e1f0
This diff is collapsed.
...@@ -138,7 +138,8 @@ enum six_lock_type { ...@@ -138,7 +138,8 @@ enum six_lock_type {
}; };
struct six_lock { struct six_lock {
atomic64_t state; atomic_t state;
u32 seq;
unsigned intent_lock_recurse; unsigned intent_lock_recurse;
struct task_struct *owner; struct task_struct *owner;
unsigned __percpu *readers; unsigned __percpu *readers;
...@@ -196,7 +197,7 @@ do { \ ...@@ -196,7 +197,7 @@ do { \
*/ */
static inline u32 six_lock_seq(const struct six_lock *lock) 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); bool six_trylock_ip(struct six_lock *lock, enum six_lock_type type, unsigned long ip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment