mm/vmscan.c: use update_lru_size() in update_lru_sizes()
authorWei Yang <richard.weiyang@gmail.com>
Wed, 3 Jun 2020 23:01:12 +0000 (16:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jun 2020 03:09:47 +0000 (20:09 -0700)
We already defined the helper update_lru_size().

Let's use this to reduce code duplication.

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

index 1d1d253..197eba5 100644 (file)
@@ -1602,10 +1602,7 @@ static __always_inline void update_lru_sizes(struct lruvec *lruvec,
                if (!nr_zone_taken[zid])
                        continue;
 
-               __update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]);
-#ifdef CONFIG_MEMCG
-               mem_cgroup_update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]);
-#endif
+               update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]);
        }
 
 }