Re: [mm] [PATCH 4/4] Memory cgroup hierarchy feature selector (v4)

From: Li Zefan
Date: Sun Nov 16 2008 - 23:46:41 EST


> + /*
> + * If parent's use_hiearchy is set, we can't make any modifications
> + * in the child subtrees. If it is unset, then the change can
> + * occur, provided the current cgroup has no children.
> + *
> + * For the root cgroup, parent_mem is NULL, we allow value to be
> + * set if there are no children.
> + */
> + if (!parent_mem || (!parent_mem->use_hierarchy &&
> + (val == 1 || val == 0))) {

Should be :

if ((!parent_mem || !parent_mem->use_hierarchy) &&
(val == 1 || val == 0)) {

> + if (list_empty(&cont->children))
> + mem->use_hierarchy = val;
> + else
> + retval = -EBUSY;
> + } else
> + retval = -EINVAL;
> + cgroup_unlock();
> +
> + return retval;
> +}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/