/* Return the number of tasks in the cgroup.  */
int cgroup_task_count(const struct cgroup *cgrp)
/* Return the number of tasks in the cgroup.  */
int cgroup_task_count(const struct cgroup *cgrp)
{
	int count = 0;
	struct cg_cgroup_link *link;
	read_lock(&css_set_lock);
	list_for_each_entry(link, &cgrp->css_sets, cgrp_link_list) {
		count += atomic_read(&link->cg->refcount);
	}
	read_unlock(&css_set_lock);
	return count;
}