summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-28 00:37:56 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2019-03-28 00:37:56 -0400
commit5b7a225cd1a22b8e562f121c88d92acdf2ee63b4 (patch)
treec7a2b3e5edc6c38d9e1f88a1591bd81cb0e4f775
parent410c5d508c524d892e1e2e629a21f19064d145f6 (diff)
six_locks: kill SIX_LOCK_SEPARATE_LOCKFNS
-rw-r--r--include/linux/six.h37
-rw-r--r--kernel/locking/six.c32
2 files changed, 0 insertions, 69 deletions
diff --git a/include/linux/six.h b/include/linux/six.h
index 34ab46e60931..a7c5d20465f3 100644
--- a/include/linux/six.h
+++ b/include/linux/six.h
@@ -138,8 +138,6 @@ do { \
#define __SIX_VAL(field, _v) (((union six_lock_state) { .field = _v }).v)
-#ifdef SIX_LOCK_SEPARATE_LOCKFNS
-
#define __SIX_LOCK(type) \
bool six_trylock_##type(struct six_lock *); \
bool six_relock_##type(struct six_lock *, u32); \
@@ -184,41 +182,6 @@ static inline void six_unlock_type(struct six_lock *lock, enum six_lock_type typ
SIX_LOCK_DISPATCH(type, six_unlock, lock);
}
-#else
-
-bool six_trylock_type(struct six_lock *, enum six_lock_type);
-bool six_relock_type(struct six_lock *, enum six_lock_type, unsigned);
-void six_lock_type(struct six_lock *, enum six_lock_type);
-void six_unlock_type(struct six_lock *, enum six_lock_type);
-
-#define __SIX_LOCK(type) \
-static __always_inline bool six_trylock_##type(struct six_lock *lock) \
-{ \
- return six_trylock_type(lock, SIX_LOCK_##type); \
-} \
- \
-static __always_inline bool six_relock_##type(struct six_lock *lock, u32 seq)\
-{ \
- return six_relock_type(lock, SIX_LOCK_##type, seq); \
-} \
- \
-static __always_inline void six_lock_##type(struct six_lock *lock) \
-{ \
- six_lock_type(lock, SIX_LOCK_##type); \
-} \
- \
-static __always_inline void six_unlock_##type(struct six_lock *lock) \
-{ \
- six_unlock_type(lock, SIX_LOCK_##type); \
-}
-
-__SIX_LOCK(read)
-__SIX_LOCK(intent)
-__SIX_LOCK(write)
-#undef __SIX_LOCK
-
-#endif
-
void six_lock_downgrade(struct six_lock *);
bool six_lock_tryupgrade(struct six_lock *);
bool six_trylock_convert(struct six_lock *, enum six_lock_type,
diff --git a/kernel/locking/six.c b/kernel/locking/six.c
index a4c2052aa8a9..9fa58b6fadc9 100644
--- a/kernel/locking/six.c
+++ b/kernel/locking/six.c
@@ -400,8 +400,6 @@ static void __six_unlock_type(struct six_lock *lock, enum six_lock_type type)
six_lock_wakeup(lock, state, l[type].unlock_wakeup);
}
-#ifdef SIX_LOCK_SEPARATE_LOCKFNS
-
#define __SIX_LOCK(type) \
bool six_trylock_##type(struct six_lock *lock) \
{ \
@@ -433,36 +431,6 @@ __SIX_LOCK(write)
#undef __SIX_LOCK
-#else
-
-bool six_trylock_type(struct six_lock *lock, enum six_lock_type type)
-{
- return __six_trylock_type(lock, type);
-}
-EXPORT_SYMBOL_GPL(six_trylock_type);
-
-bool six_relock_type(struct six_lock *lock, enum six_lock_type type,
- unsigned seq)
-{
- return __six_relock_type(lock, type, seq);
-
-}
-EXPORT_SYMBOL_GPL(six_relock_type);
-
-void six_lock_type(struct six_lock *lock, enum six_lock_type type)
-{
- __six_lock_type(lock, type);
-}
-EXPORT_SYMBOL_GPL(six_lock_type);
-
-void six_unlock_type(struct six_lock *lock, enum six_lock_type type)
-{
- __six_unlock_type(lock, type);
-}
-EXPORT_SYMBOL_GPL(six_unlock_type);
-
-#endif
-
/* Convert from intent to read: */
void six_lock_downgrade(struct six_lock *lock)
{