/* On success, returns true; the lock should be later released with cgroup_unlock(). On failure returns false with no lock held.  */
bool cgroup_lock_live_group(struct cgroup *cgrp)
/* On success, returns true; the lock should be later released with cgroup_unlock(). On failure returns false with no lock held.  */
bool cgroup_lock_live_group(struct cgroup *cgrp)
{
	mutex_lock(&cgroup_mutex);
	if (cgroup_is_removed(cgrp)) {
		mutex_unlock(&cgroup_mutex);
		return false;
	}
	return true;
}