memcg: disable hierarchy support if bound to the legacy cgroup hierarchy
authorVladimir Davydov <vdavydov@parallels.com>
Thu, 12 Mar 2015 23:26:19 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Mar 2015 01:46:08 +0000 (18:46 -0700)
commit7feee590bb18ffc42636975f74c2c3120ce1901c
tree58e0fcfa29b1d7a84c7688062a8374464739b7eb
parenta5a6579db33af91f4f5134e14be758dc71c1b694
memcg: disable hierarchy support if bound to the legacy cgroup hierarchy

If the memory cgroup controller is initially mounted in the scope of the
default cgroup hierarchy and then remounted to a legacy hierarchy, it will
still have hierarchy support enabled, which is incorrect.  We should
disable hierarchy support if bound to the legacy cgroup hierarchy.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c