]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/vmscan: sc->reclaim_idx must be a valid zone index
authorWei Yang <richard.weiyang@gmail.com>
Thu, 14 Apr 2022 19:16:54 +0000 (12:16 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 14 Apr 2022 21:49:53 +0000 (17:49 -0400)
commit480cd5ee7475255df484471cb9e7e0b302571920
tree0acfd9ba4a1a9e98597df4bfb88d952fe69db095
parent8774cc12ee3a6b0b76dc59f12d30d2d2e8b96b18
mm/vmscan: sc->reclaim_idx must be a valid zone index

lruvec_lru_size() is only used in get_scan_count(), so the only possible
zone_idx is sc->reclaim_idx.  Since sc->reclaim_idx is ensured to be a
valid zone idex, we can remove the extra check for zone iteration.

Link: https://lkml.kernel.org/r/20220317234624.23358-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c