/* Get next queue for service. Unless we have a queue preemption, we'll simply select the first cfqq in the service tree.  */
static struct cfq_queue* cfq_get_next_queue(struct cfq_data *cfqd)
/* Get next queue for service. Unless we have a queue preemption, we'll simply select the first cfqq in the service tree.  */
static struct cfq_queue* cfq_get_next_queue(struct cfq_data *cfqd)
{
	struct cfq_rb_root *service_tree =
		service_tree_for(cfqd->serving_group, cfqd->serving_prio,
					cfqd->serving_type);
	if (!cfqd->rq_queued)
		return NULL;
	if (!service_tree)
		return NULL;
	if (RB_EMPTY_ROOT(&service_tree->rb))
		return NULL;
	return cfq_rb_first(service_tree);
}