rcu-tasks: Simplify trc_inspect_reader() QS logic
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 1 Jun 2022 04:38:15 +0000 (21:38 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:22:28 +0000 (09:22 -0700)
commit0968e8920b5b11b7a33982890ad9150e09e1cb1f
tree204f6f2a5f66ed0bfdb114da7c6d5e3709fc55bf
parent6a694411977a6d57ff76a896a745c2f717372dac
rcu-tasks: Simplify trc_inspect_reader() QS logic

Currently, trc_inspect_reader() does one check for nesting less than
or equal to zero, then sorts out the distinctions within this single
"if" statement.  This commit simplifies the logic by providing one
"if" statement for quiescent states (nesting of zero) and another "if"
statement for transitioning from one nesting level to another or the
outermost rcu_read_unlock_trace() (negative nesting).

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: KP Singh <kpsingh@kernel.org>
kernel/rcu/tasks.h