[PATCH] rcu: don't set ->next_pending in rcu_start_batch()

I think it is better to set ->next_pending in the caller, when
it is needed. This saves one parameter, and this coincides with
cpu_quiet() beahaviour, which sets ->completed = ->cur itself.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Oleg Nesterov and committed by
Linus Torvalds
dbc1651f 1fd5a46d

+4 -7
+4 -7
kernel/rcupdate.c
··· 236 236 * active batch and the batch to be registered has not already occurred. 237 237 * Caller must hold rcu_state.lock. 238 238 */ 239 - static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp, 240 - int next_pending) 239 + static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp) 241 240 { 242 - if (next_pending) 243 - rcp->next_pending = 1; 244 - 245 241 if (rcp->next_pending && 246 242 rcp->completed == rcp->cur) { 247 243 rcp->next_pending = 0; ··· 271 275 if (cpus_empty(rsp->cpumask)) { 272 276 /* batch completed ! */ 273 277 rcp->completed = rcp->cur; 274 - rcu_start_batch(rcp, rsp, 0); 278 + rcu_start_batch(rcp, rsp); 275 279 } 276 280 } 277 281 ··· 406 410 if (!rcp->next_pending) { 407 411 /* and start it/schedule start if it's a new batch */ 408 412 spin_lock(&rsp->lock); 409 - rcu_start_batch(rcp, rsp, 1); 413 + rcp->next_pending = 1; 414 + rcu_start_batch(rcp, rsp); 410 415 spin_unlock(&rsp->lock); 411 416 } 412 417 } else {