From e9f2762409e2795c1e418ed196a7f27df46cf1e7 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 29 Nov 2013 00:17:27 -0500 Subject: migrate_disable pushd down in rt_spin_trylock_irqsave Signed-off-by: Nicholas Mc Guire Signed-off-by: Sebastian Andrzej Siewior diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index f6b6ebb..ef42b8a 100644 --- a/kernel/rtmutex.c +++ b/kernel/rtmutex.c @@ -920,12 +920,11 @@ int __lockfunc rt_spin_trylock_irqsave(spinlock_t *lock, unsigned long *flags) int ret; *flags = 0; - migrate_disable(); ret = rt_mutex_trylock(&lock->lock); - if (ret) + if (ret) { + migrate_disable(); spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); - else - migrate_enable(); + } return ret; } EXPORT_SYMBOL(rt_spin_trylock_irqsave); -- cgit v0.10.2