diff options
Diffstat (limited to 'kernel/rt.c')
-rw-r--r-- | kernel/rt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/rt.c b/kernel/rt.c index ff56d3c..d58b410 100644 --- a/kernel/rt.c +++ b/kernel/rt.c @@ -196,10 +196,9 @@ int __lockfunc rt_write_trylock_irqsave(rwlock_t *rwlock, unsigned long *flags) int ret; *flags = 0; - migrate_disable(); ret = rt_write_trylock(rwlock); - if (!ret) - migrate_enable(); + if (ret) + migrate_disable(); return ret; } EXPORT_SYMBOL(rt_write_trylock_irqsave); |