lkml.org 
[lkml]   [2008]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [mm] [PATCH 4/4] Memory cgroup hierarchy feature selector (v4)
Li Zefan wrote:
>> + /*
>> + * 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)) {

Yes, we need to validate values for root cgroup as well. Thanks for the comments

--
Balbir


\
 
 \ /
  Last update: 2008-11-17 05:53    [W:0.042 / U:1.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site