提交 77dc1741 编写于 作者: P Paul E. McKenney

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: NPaul E. McKenney <paulmck@kernel.org>
上级 e1eb075c
...@@ -338,14 +338,11 @@ static void rcu_tasks_wait_gp(struct rcu_tasks *rtp) ...@@ -338,14 +338,11 @@ static void rcu_tasks_wait_gp(struct rcu_tasks *rtp)
if (fract > HZ) if (fract > HZ)
fract = HZ; fract = HZ;
for (;;) { while (!list_empty(&holdouts)) {
bool firstreport; bool firstreport;
bool needreport; bool needreport;
int rtst; int rtst;
if (list_empty(&holdouts))
break;
/* Slowly back off waiting for holdouts */ /* Slowly back off waiting for holdouts */
set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS); set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS);
schedule_timeout_idle(HZ/fract); schedule_timeout_idle(HZ/fract);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册