summaryrefslogtreecommitdiff
path: root/kernel/rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rt.c')
-rw-r--r--kernel/rt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/rt.c b/kernel/rt.c
index 92a16e1..ff56d3c 100644
--- a/kernel/rt.c
+++ b/kernel/rt.c
@@ -182,11 +182,10 @@ int __lockfunc rt_write_trylock(rwlock_t *rwlock)
{
int ret = rt_mutex_trylock(&rwlock->lock);
- migrate_disable();
- if (ret)
+ if (ret) {
rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_);
- else
- migrate_enable();
+ migrate_disable();
+ }
return ret;
}