]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: always create memsw files if CONFIG_CGROUP_MEM_RES_CTLR_SWAP
authorTejun Heo <tj@kernel.org>
Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)
committerTejun Heo <tj@kernel.org>
Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)
commitd8345f34b3a1ddce524a238555b77e67b751f137
treebbeb3d558e52dc064c74f028907b5b525f88cd14
parent213ccd43823e71c815a7a3dbc2fc5b9efb61c5c5
memcg: always create memsw files if CONFIG_CGROUP_MEM_RES_CTLR_SWAP

Instead of conditioning creation of memsw files on do_swap_account,
always create the files if compiled-in and fail read/write attempts
with -EOPNOTSUPP if !do_swap_account.

This is suggested by KAMEZAWA to simplify memcg file creation so that
it can use cgroup->subsys_cftypes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
mm/memcontrol.c