Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a1dfd7f authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Gerrit - the friendly Code Review server
Browse files

rcu: Simplify rcu_sched_qs() control flow



This commit applies an early-exit approach to rcu_sched_qs(), reducing
the nesting level and saving a line of code.

Change-Id: Ib5dff7a0e3a26ce8ed319fd03b15e77b7b6650db
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Git-commit: fecbf6f01fbd83e6419ccb7f61d9a6eb987f1d92
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarPrateek Sood <prsood@codeaurora.org>
parent ae2a1f63
Loading
Loading
Loading
Loading
+14 −15
Original line number Diff line number Diff line
@@ -250,7 +250,8 @@ void rcu_sched_qs(void)
{
	unsigned long flags;

	if (__this_cpu_read(rcu_sched_data.cpu_no_qs.s)) {
	if (!__this_cpu_read(rcu_sched_data.cpu_no_qs.s))
		return;
	trace_rcu_grace_period(TPS("rcu_sched"),
			       __this_cpu_read(rcu_sched_data.gpnum),
			       TPS("cpuqs"));
@@ -261,12 +262,10 @@ void rcu_sched_qs(void)
	if (__this_cpu_read(rcu_sched_data.cpu_no_qs.b.exp)) {
		__this_cpu_write(rcu_sched_data.cpu_no_qs.b.exp, false);
		rcu_report_exp_rdp(&rcu_sched_state,
					   this_cpu_ptr(&rcu_sched_data),
					   true);
				   this_cpu_ptr(&rcu_sched_data), true);
	}
	local_irq_restore(flags);
}
}

void rcu_bh_qs(void)
{