[PATCH RT 1/4] Revert "migrate_disable pushd down in atomic_dec_and_spin_lock"
From: Steven Rostedt
Date: Wed Jul 02 2014 - 13:15:48 EST
3.12.22-rt35-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
This reverts commit ff9c870c3e27d58c9512fad122e91436681fee5a.
Cc: stable-rt@xxxxxxxxxxxxxxx
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/rtmutex.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index 4057bc607923..d1b2ca08b160 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -952,12 +952,12 @@ int atomic_dec_and_spin_lock(atomic_t *atomic, spinlock_t *lock)
/* Subtract 1 from counter unless that drops it to 0 (ie. it was 1) */
if (atomic_add_unless(atomic, -1, 1))
return 0;
+ migrate_disable();
rt_spin_lock(lock);
- if (atomic_dec_and_test(atomic)){
- migrate_disable();
+ if (atomic_dec_and_test(atomic))
return 1;
- }
rt_spin_unlock(lock);
+ migrate_enable();
return 0;
}
EXPORT_SYMBOL(atomic_dec_and_spin_lock);
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/