Re: [PATCH v2 04/11] zsmalloc: switch handle type to struct zs_handle
From: Nhat Pham
Date: Tue Nov 10 2026 - 16:06:30 EST
On Mon, Nov 9, 2026 at 10:48 PM Sergey Senozhatsky
<senozhatsky@xxxxxxxxxxxx> wrote:
>
> zsmalloc handle is an unsigned long that holds an address of a
> handle_cachep object, so zsmalloc and its users have to cast it
> back and forth. Introduce struct zs_handle and switch zsmalloc,
> zram and zswap to struct zs_handle pointers. Functions that only
> read the handle take a const pointer.
>
> This is a preparation for embedding struct zs_handle into zram and
> zswap entries. No functional change.
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>