lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 17 Jul 2012 17:42:27 +0800 From: Wanpeng Li <liwanp@...ux.vnet.ibm.com> To: linux-mm@...ck.org Cc: Michal Hocko <mhocko@...e.cz>, Johannes Weiner <hannes@...xchg.org>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>, cgroups@...r.kernel.org, linux-kernel@...r.kernel.org, Gavin Shan <shangw@...ux.vnet.ibm.com>, Wanpeng Li <liwanp@...ux.vnet.ibm.com> Subject: [PATCH] mm/memcg: remove redundant checking on root memcg Function __mem_cgroup_cancel_local_charge is only called by mem_cgroup_move_parent. For this case, root memcg has been checked by mem_cgroup_move_parent. So we needn't check that again in function __mem_cgroup_cancel_local_charge and just remove the check in function __mem_cgroup_cancel_local_charge. Signed-off-by: Wanpeng Li <liwanp@...ux.vnet.ibm.com> --- mm/memcontrol.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6392c0a..d346347 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2404,9 +2404,6 @@ static void __mem_cgroup_cancel_local_charge(struct mem_cgroup *memcg, { unsigned long bytes = nr_pages * PAGE_SIZE; - if (mem_cgroup_is_root(memcg)) - return; - res_counter_uncharge_until(&memcg->res, memcg->res.parent, bytes); if (do_swap_account) res_counter_uncharge_until(&memcg->memsw, -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists