Skip to content

Commit

Permalink
mm/vmscan.c: use update_lru_size() in update_lru_sizes()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yang authored and Linus Torvalds committed Jun 4, 2020
1 parent ff45fc3 commit a892cb6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

}
Expand Down

0 comments on commit a892cb6

Please sign in to comment.