diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2014-05-02 15:32:30 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-02-13 22:21:15 (GMT) |
commit | 5b95042d47984fc3ebb3f682b5ba82915153231b (patch) | |
tree | e653ceb520819ca59f86e663659e290de2570c13 | |
parent | 0f9c2e7e12ad391d1157d3a0be1bc08be7910516 (diff) | |
download | linux-fsl-qoriq-5b95042d47984fc3ebb3f682b5ba82915153231b.tar.xz |
Revert "migrate_disable pushd down in atomic_dec_and_spin_lock"
This reverts commit ff9c870c3e27d58c9512fad122e91436681fee5a.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | kernel/rtmutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index c70436b..5c70d79 100644 --- a/kernel/rtmutex.c +++ b/kernel/rtmutex.c @@ -1091,12 +1091,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); |