[Devel] [PATCH RHEL7 COMMIT] memcg: fix a type in memcg_charge_kmem_nofail

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 29 04:00:30 PDT 2015

The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.21
commit 8846bc9683e215517c68fc4cf36dfddcc3e29413
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Mon Jun 29 15:00:30 2015 +0400

    memcg: fix a type in memcg_charge_kmem_nofail
    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 08bc82e..e7c1cd3 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)

More information about the Devel mailing list