mutex: Fix up mutex_waiter usage
The patch moving bits into mutex.c was a little too much; by also
moving struct mutex_waiter a few less common CONFIGs would no longer
build.
Fixes: 5f35d5a66b
("locking/mutex: Make __mutex_owner static to mutex.c")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
alistair/sunxi64-5.4-dsi
parent
a037d26922
commit
e57d143091
|
@ -65,6 +65,19 @@ struct mutex {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the control structure for tasks blocked on mutex,
|
||||||
|
* which resides on the blocked task's kernel stack:
|
||||||
|
*/
|
||||||
|
struct mutex_waiter {
|
||||||
|
struct list_head list;
|
||||||
|
struct task_struct *task;
|
||||||
|
struct ww_acquire_ctx *ww_ctx;
|
||||||
|
#ifdef CONFIG_DEBUG_MUTEXES
|
||||||
|
void *magic;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_MUTEXES
|
#ifdef CONFIG_DEBUG_MUTEXES
|
||||||
|
|
||||||
#define __DEBUG_MUTEX_INITIALIZER(lockname) \
|
#define __DEBUG_MUTEX_INITIALIZER(lockname) \
|
||||||
|
|
|
@ -36,19 +36,6 @@
|
||||||
# include "mutex.h"
|
# include "mutex.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the control structure for tasks blocked on mutex,
|
|
||||||
* which resides on the blocked task's kernel stack:
|
|
||||||
*/
|
|
||||||
struct mutex_waiter {
|
|
||||||
struct list_head list;
|
|
||||||
struct task_struct *task;
|
|
||||||
struct ww_acquire_ctx *ww_ctx;
|
|
||||||
#ifdef CONFIG_DEBUG_MUTEXES
|
|
||||||
void *magic;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
void
|
void
|
||||||
__mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key)
|
__mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#define debug_mutex_unlock(lock) do { } while (0)
|
#define debug_mutex_unlock(lock) do { } while (0)
|
||||||
#define debug_mutex_init(lock, name, key) do { } while (0)
|
#define debug_mutex_init(lock, name, key) do { } while (0)
|
||||||
|
|
||||||
struct mutex_waiter;
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
|
debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue