Re: [PATCH v2] docs: pagemap: fix flags location, member name and sample code

From: SeongJae Park

Date: Fri Jun 26 2026 - 20:15:31 EST


On Sat, 27 Jun 2026 00:27:10 +0800 Zenghui Yu <zenghui.yu@xxxxxxxxx> wrote:

> The userland visible page flags (KPF_*) were initially moved to
> include/linux/kernel-page-flags.h in commit 1a9b5b7fe0c5 ("mm: export
> stable page flags"), and later moved to
> include/uapi/linux/kernel-page-flags.h in commit 607ca46e97a1 ("UAPI:
> (Scripted) Disintegrate include/linux"). Update the doc to reflect the
> current location of these flags.
>
> The member @walk_end of struct pm_scan_arg {} was wrongly written as
> "end_walk".
>
> The first sample code of the PAGEMAP_SCAN ioctl wrongly used the
> PM_SCAN_CHECK_WPASYNC flag twice, instead of the PM_SCAN_WP_MATCHING flag.
> The second one included the wrong category in the required mask -
> PAGE_IS_FILE should be used instead of PAGE_IS_SWAPPED as per the
> intention.
>
> Fix them all together.
>
> Signed-off-by: Zenghui Yu <zenghui.yu@xxxxxxxxx>
> ---
>
> * From v1 [1]:
> - drop PAGE_IS_SWAPPED in .category_mask (David)
> - fix typo in commit message (David)

Good catches!

> - didn't collect SeongJae's R-b (as the content has changed anyway) but
> thank you for that!

Let me give it again :)

Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>

>
> [1] https://lore.kernel.org/20260625174447.24292-1-zenghui.yu@xxxxxxxxx


Thanks,
SJ

[...]