linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] migrate_disable pushd down in rt_write_trylock_irqsave
@ 2013-11-30  3:08 Nicholas Mc Guire
  0 siblings, 0 replies; only message in thread
From: Nicholas Mc Guire @ 2013-11-30  3:08 UTC (permalink / raw)
  To: linux-rt-users

>From 7b60d163555d701b88f463d12ba62c6ceb61fb66 Mon Sep 17 00:00:00 2001
From: Nicholas Mc Guire <der.herr@hofr.at>
Date: Fri, 29 Nov 2013 00:21:59 -0500
Subject: [PATCH 4/4] migrate_disable pushd down in rt_write_trylock_irqsave

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
 kernel/rt.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/rt.c b/kernel/rt.c
index 75372f0..ce44afc 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);
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-30  3:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30  3:08 [PATCH 4/4] migrate_disable pushd down in rt_write_trylock_irqsave Nicholas Mc Guire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).