Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320796
b: refs/heads/master
c: 567fb43
h: refs/heads/master
v: v3
  • Loading branch information
Glauber Costa authored and Linus Torvalds committed Aug 1, 2012
1 parent 545017f commit 574c455
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca28ddc908fcfef0e5c1b6e5df632db7fc26de10
refs/heads/master: 567fb435bb7a37afda35902b884562c40756dc45
6 changes: 6 additions & 0 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -3764,6 +3764,10 @@ static int mem_cgroup_hierarchy_write(struct cgroup *cont, struct cftype *cft,
parent_memcg = mem_cgroup_from_cont(parent);

cgroup_lock();

if (memcg->use_hierarchy == val)
goto out;

/*
* If parent's use_hierarchy is set, we can't make any modifications
* in the child subtrees. If it is unset, then the change can
Expand All @@ -3780,6 +3784,8 @@ static int mem_cgroup_hierarchy_write(struct cgroup *cont, struct cftype *cft,
retval = -EBUSY;
} else
retval = -EINVAL;

out:
cgroup_unlock();

return retval;
Expand Down

0 comments on commit 574c455

Please sign in to comment.