aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-09-15 15:41:50 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-11-02 17:12:42 -0800
commit77dc174103fdb121c47621e9856d73704b7eddd2 (patch)
tree003a579a37d45a308f1a8402db455a6aabd8bd09 /kernel/rcu
parentrcutorture: Make preemptible TRACE02 enable lockdep (diff)
downloadlinux-dev-77dc174103fdb121c47621e9856d73704b7eddd2.tar.xz
linux-dev-77dc174103fdb121c47621e9856d73704b7eddd2.zip
rcu-tasks: Convert rcu_tasks_wait_gp() for-loop to while-loop
The infinite for-loop in rcu_tasks_wait_gp() has its only exit at the top of the loop, so this commit does the straightforward conversion to a while-loop, thus saving a few lines. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/tasks.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index d5d9f2d03e8a..a93271fc2572 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -338,14 +338,11 @@ static void rcu_tasks_wait_gp(struct rcu_tasks *rtp)
if (fract > HZ)
fract = HZ;
- for (;;) {
+ while (!list_empty(&holdouts)) {
bool firstreport;
bool needreport;
int rtst;
- if (list_empty(&holdouts))
- break;
-
/* Slowly back off waiting for holdouts */
set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS);
schedule_timeout_idle(HZ/fract);