Re: [PATCH v2 13/15] lib/lz4: switch the decompressor to the vendored sources
From: Sergey Senozhatsky
Date: Tue Nov 10 2026 - 00:42:12 EST
On (26/11/06 15:42), Michal Wilczynski wrote:
[..]
> diff --git a/drivers/block/zram/backend_lz4.c b/drivers/block/zram/backend_lz4.c
> index 50265e3ce256490994cb6dae32a45da376e408e0..b9b8a5f678c155442fa3fd2c1984e45182e6fc38 100644
> --- a/drivers/block/zram/backend_lz4.c
> +++ b/drivers/block/zram/backend_lz4.c
> @@ -84,7 +84,7 @@ static int lz4_create(struct zcomp_params *params, struct zcomp_ctx *ctx)
> if (!zctx->mem)
> goto error;
> } else {
> - zctx->dstrm = kzalloc_obj(*zctx->dstrm);
> + zctx->dstrm = kzalloc(LZ4_MEM_DECOMPRESS, GFP_KERNEL);
> if (!zctx->dstrm)
> goto error;
>
> diff --git a/drivers/block/zram/backend_lz4hc.c b/drivers/block/zram/backend_lz4hc.c
> index e7ee3740219852f079d1e0866da6b213a3f3a583..1e09c93016264259c149e2913b2819571b56fab6 100644
> --- a/drivers/block/zram/backend_lz4hc.c
> +++ b/drivers/block/zram/backend_lz4hc.c
> @@ -65,7 +65,7 @@ static int lz4hc_create(struct zcomp_params *params, struct zcomp_ctx *ctx)
> if (!zctx->mem)
> goto error;
> } else {
> - zctx->dstrm = kzalloc_obj(*zctx->dstrm);
> + zctx->dstrm = kzalloc(LZ4_MEM_DECOMPRESS, GFP_KERNEL);
> if (!zctx->dstrm)
> goto error;
Ditto, outdated zram code.
My ask would be to not squash zram changes with lz4 changes, when (iff)
possible.