summaryrefslogtreecommitdiff
path: root/include/linux/srcutree.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2025-07-15 21:09:13 -0700
committerPaul E. McKenney <paulmck@kernel.org>2025-08-14 15:25:48 -0700
commitf39494089aaa1022008eee245fb83ef1ae911b6d (patch)
tree2e3dfea5144e79e4915d39080f2ff95fabba92c1 /include/linux/srcutree.h
parent61399e0c5410567ef60cb1cda34cca42903842e3 (diff)
downloadlinux-next-f39494089aaa1022008eee245fb83ef1ae911b6d.tar.gz
linux-next-f39494089aaa1022008eee245fb83ef1ae911b6d.zip
srcu: Move rcu_is_watching() checks to srcu_read_{,un}lock_fast()
The rcu_is_watching() warnings are currently in the SRCU-tree implementations of __srcu_read_lock_fast() and __srcu_read_unlock_fast(). However, this makes it difficult to create _notrace variants of srcu_read_lock_fast() and srcu_read_unlock_fast(). This commit therefore moves these checks to srcu_read_lock_fast(), srcu_read_unlock_fast(), srcu_down_read_fast(), and srcu_up_read_fast(). Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: <bpf@vger.kernel.org>
Diffstat (limited to 'include/linux/srcutree.h')
-rw-r--r--include/linux/srcutree.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h
index bf44d8d1e69e..043b5a67ef71 100644
--- a/include/linux/srcutree.h
+++ b/include/linux/srcutree.h
@@ -244,7 +244,6 @@ static inline struct srcu_ctr __percpu *__srcu_read_lock_fast(struct srcu_struct
{
struct srcu_ctr __percpu *scp = READ_ONCE(ssp->srcu_ctrp);
- RCU_LOCKDEP_WARN(!rcu_is_watching(), "RCU must be watching srcu_read_lock_fast().");
if (!IS_ENABLED(CONFIG_NEED_SRCU_NMI_SAFE))
this_cpu_inc(scp->srcu_locks.counter); /* Y */
else
@@ -275,7 +274,6 @@ static inline void __srcu_read_unlock_fast(struct srcu_struct *ssp, struct srcu_
this_cpu_inc(scp->srcu_unlocks.counter); /* Z */
else
atomic_long_inc(raw_cpu_ptr(&scp->srcu_unlocks)); /* Z */
- RCU_LOCKDEP_WARN(!rcu_is_watching(), "RCU must be watching srcu_read_unlock_fast().");
}
void __srcu_check_read_flavor(struct srcu_struct *ssp, int read_flavor);