Re: [PATCH] cfq-iosched: don't check cfqg in choose_service_tree()

Jeff Moyer
2010-12-14T16:56:38Z

Gui Jianfeng <guijianfeng@cn.fujitsu.com> writes:

> When cfq_choose_cfqg() is called in select_queue(), there must be at least one
> backlogged CFQ queue waiting for dispatching, hence there must be at least one
> backlogged CFQ group on service tree. So we never call choose_service_tree()
> with cfqg == NULL.

Further, if cfqg was NULL, cfq_choose_cfqg would have dereferenced a
NULL pointer and we wouldn't even get to choose_service_tree.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>