[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190712170024.111093-2-joel@joelfernandes.org>
Date: Fri, 12 Jul 2019 13:00:16 -0400
From: "Joel Fernandes (Google)" <joel@...lfernandes.org>
To: linux-kernel@...r.kernel.org
Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Borislav Petkov <bp@...en8.de>, c0d1n61at3@...il.com,
"David S. Miller" <davem@...emloft.net>, edumazet@...gle.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Jonathan Corbet <corbet@....net>,
Josh Triplett <josh@...htriplett.org>, keescook@...omium.org,
kernel-hardening@...ts.openwall.com, kernel-team@...roid.com,
Lai Jiangshan <jiangshanlai@...il.com>,
Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
linux-doc@...r.kernel.org, linux-pci@...r.kernel.org,
linux-pm@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
neilb@...e.com, netdev@...r.kernel.org,
Oleg Nesterov <oleg@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.ibm.com>,
Pavel Machek <pavel@....cz>, peterz@...radead.org,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
rcu@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
Tejun Heo <tj@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, will@...nel.org,
x86@...nel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Subject: [PATCH v2 1/9] rcu/update: Remove useless check for debug_locks
In rcu_read_lock_sched_held(), debug_locks can never be true at the
point we check it because we already check debug_locks in
debug_lockdep_rcu_enabled() in the beginning. Remove the check.
Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
---
kernel/rcu/update.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index c3bf44ba42e5..bb961cd89e76 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -93,17 +93,13 @@ module_param(rcu_normal_after_boot, int, 0);
*/
int rcu_read_lock_sched_held(void)
{
- int lockdep_opinion = 0;
-
if (!debug_lockdep_rcu_enabled())
return 1;
if (!rcu_is_watching())
return 0;
if (!rcu_lockdep_current_cpu_online())
return 0;
- if (debug_locks)
- lockdep_opinion = lock_is_held(&rcu_sched_lock_map);
- return lockdep_opinion || !preemptible();
+ return lock_is_held(&rcu_sched_lock_map) || !preemptible();
}
EXPORT_SYMBOL(rcu_read_lock_sched_held);
#endif
--
2.22.0.510.g264f2c817a-goog
Powered by blists - more mailing lists