Re: [PATCH 1/2] mm: kmemleak: move the struct page scan into a helper

From: Catalin Marinas

Date: Tue Sep 22 2026 - 06:42:57 EST


On Mon, Sep 21, 2026 at 05:30:26AM -0700, Breno Leitao wrote:
> The struct page scanning loop sits inline in __kmemleak_scan(), nested
> three levels deep and sharing the caller's "stop" variable with the
> zone walk around it. Move it into scan_zone_pages(), which scans one
> zone and returns 1 if scanning should stop.
>
> No functional change; this only makes room for changing how the pages
> are handed to scan_block().
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>