aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>2009-01-07 21:08:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 11:31:09 -0500
commit3bb4edf24b26358eccfc69ac8b9a9c36ccc312da (patch)
tree61093878836115496bd52646670d123809e1bc99 /mm/memcontrol.c
parent9836d89191edd4887ed026a9ce53d9dfac62ec1c (diff)
memcg: don't trigger oom at page migration
I think triggering OOM at mem_cgroup_prepare_migration would be just a bit overkill. Returning -ENOMEM would be enough for mem_cgroup_prepare_migration. The caller would handle the case anyway. Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8d2e5c8a25b1..3ba72e6556cc 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1361,7 +1361,7 @@ int mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr)
1361 unlock_page_cgroup(pc); 1361 unlock_page_cgroup(pc);
1362 1362
1363 if (mem) { 1363 if (mem) {
1364 ret = mem_cgroup_try_charge(NULL, GFP_KERNEL, &mem); 1364 ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, &mem, false);
1365 css_put(&mem->css); 1365 css_put(&mem->css);
1366 } 1366 }
1367 *ptr = mem; 1367 *ptr = mem;