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

Submitted by Konstantin Khorenko on July 10, 2020, 11:24 a.m.

Details

Message ID 20200710112417.25116-2-khorenko@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko July 10, 2020, 11:24 a.m.
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@virtuozzo.com>
---
 mm/memcontrol.c | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

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;

Comments

Andrey Ryabinin July 10, 2020, 11:34 a.m.
On 7/10/20 2:24 PM, Konstantin Khorenko wrote:
> 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@virtuozzo.com>


Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>