Re: [PATCH 1/4] mm/vmstat: use node_stat_add_folio/sub_folio for folio_nr_pages operations

David Hildenbrand (Arm)
2026-04-14T17:52:51Z

On 4/14/26 11:15, Ye Liu wrote:
> From: Ye Liu <liuye@kylinos.cn>
>
> Replace node_stat_mod_folio() calls that pass folio_nr_pages(folio) or
> -folio_nr_pages(folio) as the third argument with the more concise
> node_stat_add_folio() and node_stat_sub_folio() functions respectively.
>
> This makes the code more readable and reduces the number of arguments
> passed to these functions.

Also, that makes it clearer that we always account the full folio, never
parts of it.

--
Cheers,

David