Re: [PATCHv2 2/2] zsmalloc: simplify read begin/end logic

From: Andrew Morton

Date: Wed Jan 07 2026 - 13:17:06 EST


On Wed, 7 Jan 2026 14:21:45 +0900 Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> wrote:

> From: Yosry Ahmed <yosry.ahmed@xxxxxxxxx>
>
> When we switched from using class->size (for spans detection)
> to actual compressed object size, we had to compensate for
> the fact that class->size implicitly took inlined handle
> into consideration. In fact, instead of adjusting the size
> of compressed object (adding handle offset for non-huge size
> classes), we can move some lines around and simplify the
> code: there are already paths in read_begin/end that compensate
> for inlined object handle offset.

Updated, thanks.

> Signed-off-by: Yosry Ahmed <yosry.ahmed@xxxxxxxxx>
> ---

This patch should have had your Signed-off-by: also, as you were on the
delivery path. I have made that change to the mm.gt copy.