diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-04-05 03:20:34 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-04-05 03:20:34 -0400 |
| commit | ea2a6af517714c52a1209795a03e863e96b460bb (patch) | |
| tree | 3bd443bc9b23ceeaf3743eaf2d6d35ec63c620c9 /kernel/locking/rtmutex_common.h | |
| parent | 1b5d43cfb69759d8ef8d30469cea31d0c037aed5 (diff) | |
| parent | 642e7fd23353e22290e3d51719fcb658dc252342 (diff) | |
Merge branch 'linus' into sched/urgent, to pick up fixes and updates
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex_common.h')
| -rw-r--r-- | kernel/locking/rtmutex_common.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h index 68686b3ec3c1..d1d62f942be2 100644 --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h | |||
| @@ -52,12 +52,13 @@ static inline int rt_mutex_has_waiters(struct rt_mutex *lock) | |||
| 52 | static inline struct rt_mutex_waiter * | 52 | static inline struct rt_mutex_waiter * |
| 53 | rt_mutex_top_waiter(struct rt_mutex *lock) | 53 | rt_mutex_top_waiter(struct rt_mutex *lock) |
| 54 | { | 54 | { |
| 55 | struct rt_mutex_waiter *w; | 55 | struct rb_node *leftmost = rb_first_cached(&lock->waiters); |
| 56 | 56 | struct rt_mutex_waiter *w = NULL; | |
| 57 | w = rb_entry(lock->waiters.rb_leftmost, | ||
| 58 | struct rt_mutex_waiter, tree_entry); | ||
| 59 | BUG_ON(w->lock != lock); | ||
| 60 | 57 | ||
| 58 | if (leftmost) { | ||
| 59 | w = rb_entry(leftmost, struct rt_mutex_waiter, tree_entry); | ||
| 60 | BUG_ON(w->lock != lock); | ||
| 61 | } | ||
| 61 | return w; | 62 | return w; |
| 62 | } | 63 | } |
| 63 | 64 | ||
