diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2013-11-29 05:19:41 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-02-13 22:20:44 (GMT) |
commit | d667c24543ec07b01423256e67f0f3d7ba9a76cc (patch) | |
tree | 9cfd3538f2767cf96037142da4f09c90c5a9f6eb /kernel/rtmutex.c | |
parent | 6536b6b6ed300c7a36d761b37988d7a4314bde36 (diff) | |
download | linux-fsl-qoriq-d667c24543ec07b01423256e67f0f3d7ba9a76cc.tar.xz |
migrate_disable pushd down in atomic_dec_and_spin_lock
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'kernel/rtmutex.c')
-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 bd83ef0..dede95d 100644 --- a/kernel/rtmutex.c +++ b/kernel/rtmutex.c @@ -1074,12 +1074,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)) + if (atomic_dec_and_test(atomic)){ + migrate_disable(); return 1; + } rt_spin_unlock(lock); - migrate_enable(); return 0; } EXPORT_SYMBOL(atomic_dec_and_spin_lock); |