Skip to content

Commit 81f804c

Browse files
sergey-senozhatskyakpm00
authored andcommitted
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: 485d115 ("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>
1 parent f752e67 commit 81f804c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/block/zram/zram_drv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,6 @@ static int write_incompressible_page(struct zram *zram, struct page *page,
16831683
return PTR_ERR((void *)handle);
16841684

16851685
if (!zram_can_store_page(zram)) {
1686-
zcomp_stream_put(zram->comps[ZRAM_PRIMARY_COMP]);
16871686
zs_free(zram->mem_pool, handle);
16881687
return -ENOMEM;
16891688
}

0 commit comments

Comments
 (0)