[Devel] [PATCH rh7 2/4] memcg: fix a type in memcg_charge_kmem_nofail

Vladimir Davydov vdavydov at parallels.com
Thu Jun 25 09:08:23 PDT 2015


It seems we haven't got any bugs due to this typo merely because we
haven't used socket buffer accounting yet.

Fixes: b89a0b604eaf9 ("tcp: Charge socket buffers into cg memory (v3)")
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 08bc82eb86e7..e7c1cd381ab3 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3212,7 +3212,7 @@ void memcg_charge_kmem_nofail(struct mem_cgroup *memcg, u64 size)
 	res_counter_charge_nofail(&memcg->kmem, size, &fail_res);
 	res_counter_charge_nofail(&memcg->res, size, &fail_res);
 	if (do_swap_account)
-		res_counter_uncharge(&memcg->memsw, size);
+		res_counter_charge_nofail(&memcg->memsw, size, &fail_res);
 }
 
 void memcg_uncharge_kmem(struct mem_cgroup *memcg, u64 size)
-- 
2.1.4




More information about the Devel mailing list