Skip to content
Commit 54c4fe08 authored by Haifeng Xu's avatar Haifeng Xu Committed by Andrew Morton
Browse files

mm/vmscan: simplify shrink_node()

The difference between sc->nr_reclaimed and nr_reclaimed is computed three
times.  Introduce a new variable to record the value, so it only needs to
be computed once.

Link: https://lkml.kernel.org/r/20230411061757.12041-1-haifeng.xu@shopee.com


Signed-off-by: default avatarHaifeng Xu <haifeng.xu@shopee.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 09a607c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment