[Devel] [PATCH RH7 2/2] memcg, bc/vm_pages.c: drop accidental duplicated counter read

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 10 14:24:17 MSK 2020


Nothing bad happens due to this, just a redundant counter read,
drop it.

Fixes: 770906b27920d ("memcg, bc/vm_pages.c: account some swapped memory
as used in CT in /proc/meminfo")

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 mm/memcontrol.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8cd925d0b2078..62370e72b99b6 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4672,8 +4672,6 @@ void mem_cgroup_fill_sysinfo(struct mem_cgroup *memcg, struct sysinfo *si)
 	/* CT can report totalswap > SWAP available on Host */
 	si->totalswap = memcg->memsw.limit - memcg->memory.limit;
 
-	used = page_counter_read(&memcg->memory);
-
 	if (swaped > si->totalswap) {
 		si->freeswap = 0;
 		used += swaped - si->totalswap;
-- 
2.15.1



More information about the Devel mailing list