[079/131] mm/vmscan.c: use update_lru_size() in update_lru_sizes()
diff mbox series

Message ID 20200603230112.hyTngoiGE%akpm@linux-foundation.org
State New
Headers show
  • [001/131] mm/slub: fix a memory leak in sysfs_slab_add()
Related show

Commit Message

Andrew Morton June 3, 2020, 11:01 p.m. UTC
From: Wei Yang <richard.weiyang@gmail.com>
Subject: mm/vmscan.c: use update_lru_size() in update_lru_sizes()

We already defined the helper update_lru_size().

Let's use this to reduce code duplication.

Link: http://lkml.kernel.org/r/20200331221550.1011-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

 mm/vmscan.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff mbox series

--- a/mm/vmscan.c~mm-vmscanc-use-update_lru_size-in-update_lru_sizes
+++ a/mm/vmscan.c
@@ -1602,10 +1602,7 @@  static __always_inline void update_lru_s
 		if (!nr_zone_taken[zid])
-		__update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]);
-		mem_cgroup_update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]);
+		update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]);