Seems that the addition of RT_RW_READER broke the non PREEMPT_RT case.
This patch fixes it.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/rtmutex.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
Index: linux-2.6.24.7-rt9/kernel/rtmutex.c
===================================================================
--- linux-2.6.24.7-rt9.orig/kernel/rtmutex.c 2008-05-20 23:38:08.000000000 -0400
+++ linux-2.6.24.7-rt9/kernel/rtmutex.c 2008-05-21 15:16:18.000000000 -0400
@@ -123,6 +123,12 @@ static inline void mark_rt_rwlock_check(
#endif /* CONFIG_PREEMPT_RT */
#endif
+#ifdef CONFIG_PREEMPT_RT
+#define task_is_reader(task) ((task) == RT_RW_READER)
+#else
+#define task_is_reader(task) (0)
+#endif
+
int pi_initialized;
/*
@@ -315,7 +321,7 @@ static int rt_mutex_adjust_prio_chain(st
/*
* Readers are special. We may need to boost more than one owner.
*/
- if (task == RT_RW_READER) {
+ if (task_is_reader(task)) {
ret = rt_mutex_adjust_readers(orig_lock, orig_waiter,
top_task, lock,
recursion_depth);
@@ -376,7 +382,7 @@ static inline int try_to_steal_lock(stru
if (pendowner == current)
return 1;
- WARN_ON(rt_mutex_owner(lock) == RT_RW_READER);
+ WARN_ON(task_is_reader(rt_mutex_owner(lock)));
spin_lock(&pendowner->pi_lock);
if (!lock_is_stealable(pendowner, mode)) {
@@ -506,7 +512,7 @@ static int task_blocks_on_rt_mutex(struc
if (waiter == rt_mutex_top_waiter(lock)) {
/* readers are handled differently */
- if (owner == RT_RW_READER) {
+ if (task_is_reader(owner)) {
res = rt_mutex_adjust_readers(lock, waiter,
current, lock, 0);
return res;
@@ -524,7 +530,7 @@ static int task_blocks_on_rt_mutex(struc
else if (debug_rt_mutex_detect_deadlock(waiter, detect_deadlock))
chain_walk = 1;
- if (!chain_walk || owner == RT_RW_READER)
+ if (!chain_walk || task_is_reader(owner))
return 0;
/*
@@ -624,7 +630,7 @@ static void remove_waiter(struct rt_mute
current->pi_blocked_on = NULL;
spin_unlock(¤t->pi_lock);
- if (first && owner != current && owner != RT_RW_READER) {
+ if (first && owner != current && !task_is_reader(owner)) {
spin_lock(&owner->pi_lock);
--
| Dmitry Torokhov | 2.6.27-rc8+ - first impressions |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Nick Piggin | [patch 3/6] mm: fix fault vs invalidate race for linear mappings |
| Alan Cox | [PATCH 00/76] Queued TTY Patches |
git: | |
| Petr Baudis | [FYI][PATCH] Customizing the WinGit installer |
| Pierre Habouzit | Re: git push (mis ?)behavior |
| Mark Levedahl | Allowing override of the default "origin" nickname |
| Junio C Hamano | [PATCH] Detached HEAD (experimental) |
| Richard Stallman | Real men don't attack straw men |
| Luca Dell'Oca | Authenticate squid in Active Directory |
| Leon Dippenaar | New tcp stack attack |
| Nuno Magalhães | Can't scp, ssh is slow to authenticate. |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Andi Kleen | Re: [PATCH] Disable TSO for non standard qdiscs |
| Alexey Dobriyan | [PATCH 01/33] nf_conntrack_sip: de-static helper pointers |
