Re: [PATCH 1/4] mm/zswap: remove unnecessary dlen writes for incompressible pages

From: Nhat Pham
Date: Wed Oct 08 2025 - 11:47:23 EST


On Fri, Oct 3, 2025 at 1:38 PM SeongJae Park <sj@xxxxxxxxxx> wrote:
>
> Incompressible pages handling logic in zswap_compress() is setting
> 'dlen' as PAGE_SIZE twice. Once before deciding whether to save the
> content as is, and once again after it is decided to save it as is.
> But the value of 'dlen' is used only if it is decided to save the
> content as is, so the first write is unnecessary. It is not causing
> real user issues, but making code confusing to read. Remove the
> unnecessary write operation.
>
> Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>

Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>