mm/vmscan.c: simplify shrink_inactive_list()
authorKirill Tkhai <ktkhai@virtuozzo.com>
Tue, 14 May 2019 00:22:33 +0000 (17:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 May 2019 16:47:50 +0000 (09:47 -0700)
commitf46b79120e94f92843a83db1d9ece482ee735d3a
tree5d05501df36411d4477b83a7489c9d2feaf8cfb4
parentc553ea4fdf2701d64b9e9cca4497a8a2512bb025
mm/vmscan.c: simplify shrink_inactive_list()

This merges together duplicated patterns of code.  Also, replace
count_memcg_events() with its irq-careless namesake, because they are
already called in interrupts disabled context.

Link: http://lkml.kernel.org/r/2ece1df4-2989-bc9b-6172-61e9fdde5bfd@virtuozzo.com
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Baoquan He <bhe@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c