diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2013-11-22 03:52:30 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-10 00:19:26 (GMT) |
commit | ea6767f8b4469261eb3b5e9308ff170bcfbfa7bf (patch) | |
tree | cbf4056a5d9c55ee1bee44bf698e6785372c8996 /kernel/rt.c | |
parent | 73ae55fd4fdfc9fc7c07e86fb7278db47edf11fb (diff) | |
download | linux-fsl-qoriq-ea6767f8b4469261eb3b5e9308ff170bcfbfa7bf.tar.xz |
condition migration_disable on lock acquisition
No need to unconditionally migrate_disable (what is it protecting ?) and
re-enable on failure to acquire the lock.
This patch moves the migrate_disable to be conditioned on sucessful lock
acquisition only.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'kernel/rt.c')
-rw-r--r-- | kernel/rt.c | 7 |
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; } |