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 <[email protected]>
---
 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

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to