From: Sergey Senozhatsky Date: Wed, 15 Jan 2025 07:19:16 +0000 (+0900) Subject: zram: remove zcomp_stream_put() from write_incompressible_page() X-Git-Tag: v6.14-rc1~77^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81f804c3df8661c12ae5eaa1ae605694017c7349;p=thirdparty%2Fkernel%2Fstable.git zram: remove zcomp_stream_put() from write_incompressible_page() We cannot and should not put per-CPU compression stream in write_incompressible_page() because that function never gets any per-CPU streams in the first place. It's zram_write_page() that puts the stream before it calls write_incompressible_page(). Link: https://lkml.kernel.org/r/20250115072003.380567-1-senozhatsky@chromium.org Fixes: 485d11509d6d ("zram: factor out ZRAM_HUGE write") Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton --- diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 70ecaee25c20a..9f5020b077c5b 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1683,7 +1683,6 @@ static int write_incompressible_page(struct zram *zram, struct page *page, return PTR_ERR((void *)handle); if (!zram_can_store_page(zram)) { - zcomp_stream_put(zram->comps[ZRAM_PRIMARY_COMP]); zs_free(zram->mem_pool, handle); return -ENOMEM; }