cgroups: fix set command with beancounters upstream

The kernel memory controller cannot flip states from unlimited to limited if
there are already tasks in it.  Therefore, we always have to run with *some*
value of kmem enabled. If we don't do it, we can't start unlimited and then use
the set command to set any beancounters. We write the maximum amount minus two
pages, which should effectively mean "accounting turned on, but unlimited"

Signed-off-by: Glauber Costa <glommer@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed