rcu/nocb: Fix dump_tree hierarchy print always active
authorStefan Reiter <stefan@pimaker.at>
Fri, 4 Oct 2019 19:49:10 +0000 (19:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:22 +0000 (08:36 +0100)
commit3ece067c12e1c4b7cc00773498860e9c740d05bb
treee91c4f4da1b44c382ab3004379a0e644c37990bf
parent2339f7a55c849b32a88247f105a67c3a7bb40fe9
rcu/nocb: Fix dump_tree hierarchy print always active

[ Upstream commit 610dea36d3083a977e4f156206cbe1eaa2a532f0 ]

Commit 18cd8c93e69e ("rcu/nocb: Print gp/cb kthread hierarchy if
dump_tree") added print statements to rcu_organize_nocb_kthreads for
debugging, but incorrectly guarded them, causing the function to always
spew out its message.

This patch fixes it by guarding both pr_alert statements with dump_tree,
while also changing the second pr_alert to a pr_cont, to print the
hierarchy in a single line (assuming that's how it was supposed to
work).

Fixes: 18cd8c93e69e ("rcu/nocb: Print gp/cb kthread hierarchy if dump_tree")
Signed-off-by: Stefan Reiter <stefan@pimaker.at>
[ paulmck: Make single-nocbs-CPU GP kthreads look less erroneous. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/rcu/tree_plugin.h