diff options
author | Daisuke Nishimura <d-nishimura@mtf.biglobe.ne.jp> | 2010-03-23 16:35:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-24 19:31:19 -0400 |
commit | 5cfb80a73b5a52fb19d8b0611203e4dd58e8e9a2 (patch) | |
tree | bb4db72652827235f1e548c6c9db1a04406c26ad /mm | |
parent | ae6be51ed01d6c4aaf249a207b4434bc7785853b (diff) |
memcg: disable move charge in no mmu case
In commit 02491447 ("memcg: move charges of anonymous swap"), I tried to
disable move charge feature in no mmu case by enclosing all the related
functions with "#ifdef CONFIG_MMU", but the commit places these ifdefs in
wrong place. (it seems that it's mangled while handling some fixes...)
This patch fixes it up.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7973b5221fb8..00dda352144c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -3946,28 +3946,6 @@ one_by_one: | |||
3946 | } | 3946 | } |
3947 | return ret; | 3947 | return ret; |
3948 | } | 3948 | } |
3949 | #else /* !CONFIG_MMU */ | ||
3950 | static int mem_cgroup_can_attach(struct cgroup_subsys *ss, | ||
3951 | struct cgroup *cgroup, | ||
3952 | struct task_struct *p, | ||
3953 | bool threadgroup) | ||
3954 | { | ||
3955 | return 0; | ||
3956 | } | ||
3957 | static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, | ||
3958 | struct cgroup *cgroup, | ||
3959 | struct task_struct *p, | ||
3960 | bool threadgroup) | ||
3961 | { | ||
3962 | } | ||
3963 | static void mem_cgroup_move_task(struct cgroup_subsys *ss, | ||
3964 | struct cgroup *cont, | ||
3965 | struct cgroup *old_cont, | ||
3966 | struct task_struct *p, | ||
3967 | bool threadgroup) | ||
3968 | { | ||
3969 | } | ||
3970 | #endif | ||
3971 | 3949 | ||
3972 | /** | 3950 | /** |
3973 | * is_target_pte_for_mc - check a pte whether it is valid for move charge | 3951 | * is_target_pte_for_mc - check a pte whether it is valid for move charge |
@@ -4330,6 +4308,28 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss, | |||
4330 | } | 4308 | } |
4331 | mem_cgroup_clear_mc(); | 4309 | mem_cgroup_clear_mc(); |
4332 | } | 4310 | } |
4311 | #else /* !CONFIG_MMU */ | ||
4312 | static int mem_cgroup_can_attach(struct cgroup_subsys *ss, | ||
4313 | struct cgroup *cgroup, | ||
4314 | struct task_struct *p, | ||
4315 | bool threadgroup) | ||
4316 | { | ||
4317 | return 0; | ||
4318 | } | ||
4319 | static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, | ||
4320 | struct cgroup *cgroup, | ||
4321 | struct task_struct *p, | ||
4322 | bool threadgroup) | ||
4323 | { | ||
4324 | } | ||
4325 | static void mem_cgroup_move_task(struct cgroup_subsys *ss, | ||
4326 | struct cgroup *cont, | ||
4327 | struct cgroup *old_cont, | ||
4328 | struct task_struct *p, | ||
4329 | bool threadgroup) | ||
4330 | { | ||
4331 | } | ||
4332 | #endif | ||
4333 | 4333 | ||
4334 | struct cgroup_subsys mem_cgroup_subsys = { | 4334 | struct cgroup_subsys mem_cgroup_subsys = { |
4335 | .name = "memory", | 4335 | .name = "memory", |