From 574c4553bbf4da85697ee4591824c4334afaba66 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Tue, 31 Jul 2012 16:43:07 -0700 Subject: [PATCH] --- yaml --- r: 320796 b: refs/heads/master c: 567fb435bb7a37afda35902b884562c40756dc45 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/memcontrol.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 896dfc1e0170..30dade25fee8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ca28ddc908fcfef0e5c1b6e5df632db7fc26de10 +refs/heads/master: 567fb435bb7a37afda35902b884562c40756dc45 diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index 55a85e1a342f..6d3dd54ec429 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -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 @@ -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;