]> git.dujemihanovic.xyz Git - linux.git/commitdiff
mm: vmscan: modify an easily misunderstood function name
authorliujinlong <liujinlong@kylinos.cn>
Tue, 12 Sep 2023 08:59:23 +0000 (16:59 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:27 +0000 (10:32 -0700)
When looking at the code in the memory part, I found that the purpose of
the function prepare_scan_countis very different from the function name.
It is easy to misunderstand when reading.The function prepare_scan_count
mainly completes the assignment of the scan_control structure.Therefore, I
suggest that the function name can be changed to prepare_scan_control,
which is easier to understand.

Link: https://lkml.kernel.org/r/20230912085923.27238-1-liujinlong@kylinos.cn
Signed-off-by: liujinlong <liujinlong@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c

index 4a6551510b6554319df90640f77d3af29577ed93..8a3f83e0231e727ebd6d469a32a3b5cc186c491c 100644 (file)
@@ -2208,7 +2208,7 @@ enum scan_balance {
        SCAN_FILE,
 };
 
-static void prepare_scan_count(pg_data_t *pgdat, struct scan_control *sc)
+static void prepare_scan_control(pg_data_t *pgdat, struct scan_control *sc)
 {
        unsigned long file;
        struct lruvec *target_lruvec;
@@ -5834,7 +5834,7 @@ again:
        nr_reclaimed = sc->nr_reclaimed;
        nr_scanned = sc->nr_scanned;
 
-       prepare_scan_count(pgdat, sc);
+       prepare_scan_control(pgdat, sc);
 
        shrink_node_memcgs(pgdat, sc);