summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2025-01-15 16:19:16 +0900
committerAndrew Morton <akpm@linux-foundation.org>2025-01-25 20:22:45 -0800
commit81f804c3df8661c12ae5eaa1ae605694017c7349 (patch)
tree34b19cfcb204ab70dcef1816c1e39be8bf142baa
parentf752e677f85993c812fe9de7b4427f3f18408a11 (diff)
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 <senozhatsky@chromium.org> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--drivers/block/zram/zram_drv.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 70ecaee25c20..9f5020b077c5 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;
}