summaryrefslogtreecommitdiff
path: root/include/linux/six.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/six.h')
-rw-r--r--include/linux/six.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/six.h b/include/linux/six.h
index 6cec7ecdd156..313154a7927a 100644
--- a/include/linux/six.h
+++ b/include/linux/six.h
@@ -111,12 +111,18 @@ struct six_lock {
unsigned __percpu *readers;
raw_spinlock_t wait_lock;
- struct list_head wait_list[2];
+ struct list_head wait_list;
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lockdep_map dep_map;
#endif
};
+struct six_lock_waiter {
+ struct list_head list;
+ struct task_struct *task;
+ enum six_lock_type lock_want;
+};
+
typedef int (*six_lock_should_sleep_fn)(struct six_lock *lock, void *);
static __always_inline void __six_lock_init(struct six_lock *lock,
@@ -125,8 +131,7 @@ static __always_inline void __six_lock_init(struct six_lock *lock,
{
atomic64_set(&lock->state.counter, 0);
raw_spin_lock_init(&lock->wait_lock);
- INIT_LIST_HEAD(&lock->wait_list[SIX_LOCK_read]);
- INIT_LIST_HEAD(&lock->wait_list[SIX_LOCK_intent]);
+ INIT_LIST_HEAD(&lock->wait_list);
#ifdef CONFIG_DEBUG_LOCK_ALLOC
debug_check_no_locks_freed((void *) lock, sizeof(*lock));
lockdep_init_map(&lock->dep_map, name, key, 0);