/* Advance this CPU's callbacks, but only if the current grace period has ended. This may be called only from the CPU to whom the rdp belongs.  */
static void rcu_process_gp_end(struct rcu_state *rsp, struct rcu_data *rdp)
/* Advance this CPU's callbacks, but only if the current grace period has ended. This may be called only from the CPU to whom the rdp belongs.  */
static void rcu_process_gp_end(struct rcu_state *rsp, struct rcu_data *rdp)
{
	unsigned long flags;
	struct rcu_node *rnp;
	local_irq_save(flags);
	rnp = rdp->mynode;
	if (rdp->completed == ACCESS_ONCE(rnp->completed) ||
	    !spin_trylock(&rnp->lock)) {
		local_irq_restore(flags);
		return;
	}
	__rcu_process_gp_end(rsp, rnp, rdp);
	spin_unlock_irqrestore(&rnp->lock, flags);
}