diff options
author | Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2012-07-31 19:42:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:42 -0400 |
commit | d845aa2c75bcff87dacf098378b5706b12d1588f (patch) | |
tree | 2b8f35b6dc8e1b264fe78541246434d07922f606 /mm/memcontrol.c | |
parent | 59b8e85c26e77d236ebdd61866ffc5e69c5f531d (diff) |
memcg: clean up force_empty_list() return value check
After bf544fdc241da8 "memcg: move charges to root cgroup if
use_hierarchy=0 in mem_cgroup_move_hugetlb_parent()"
mem_cgroup_move_parent() returns only -EBUSY or -EINVAL. So we can remove
the -ENOMEM and -EINTR checks.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
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.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 8062d45ee7f4..a1f00f0a66cd 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -3653,8 +3653,6 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *memcg, | |||
3653 | pc = lookup_page_cgroup(page); | 3653 | pc = lookup_page_cgroup(page); |
3654 | 3654 | ||
3655 | ret = mem_cgroup_move_parent(page, pc, memcg, GFP_KERNEL); | 3655 | ret = mem_cgroup_move_parent(page, pc, memcg, GFP_KERNEL); |
3656 | if (ret == -ENOMEM || ret == -EINTR) | ||
3657 | break; | ||
3658 | 3656 | ||
3659 | if (ret == -EBUSY || ret == -EINVAL) { | 3657 | if (ret == -EBUSY || ret == -EINVAL) { |
3660 | /* found lock contention or "pc" is obsolete. */ | 3658 | /* found lock contention or "pc" is obsolete. */ |
@@ -3711,9 +3709,6 @@ move_account: | |||
3711 | } | 3709 | } |
3712 | mem_cgroup_end_move(memcg); | 3710 | mem_cgroup_end_move(memcg); |
3713 | memcg_oom_recover(memcg); | 3711 | memcg_oom_recover(memcg); |
3714 | /* it seems parent cgroup doesn't have enough mem */ | ||
3715 | if (ret == -ENOMEM) | ||
3716 | goto try_to_free; | ||
3717 | cond_resched(); | 3712 | cond_resched(); |
3718 | /* "ret" should also be checked to ensure all lists are empty. */ | 3713 | /* "ret" should also be checked to ensure all lists are empty. */ |
3719 | } while (res_counter_read_u64(&memcg->res, RES_USAGE) > 0 || ret); | 3714 | } while (res_counter_read_u64(&memcg->res, RES_USAGE) > 0 || ret); |