From 62a8255d80d52c76ef108aafc101160d027b0a4e Mon Sep 17 00:00:00 2001 From: Sergey Senozhatsky Date: Tue, 10 Dec 2024 18:38:35 +0900 Subject: [PATCH] zram-panic-when-use-ext4-over-zram-fix simplify zram_write_page() -ENOMEM return Link: https://lkml.kernel.org/r/20241210093835.GN16709@google.com Signed-off-by: Sergey Senozhatsky Cc: caiqingfu Cc: Minchan Kim Signed-off-by: Andrew Morton --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 0ca6d55c9917a..8476e0e1c8dcf 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1668,7 +1668,7 @@ static int zram_write_page(struct zram *zram, struct page *page, u32 index) if (last_comp_len && (last_comp_len != comp_len)) { zs_free(zram->mem_pool, handle); - handle = (unsigned long)ERR_PTR(-ENOMEM); + handle = -ENOMEM; } /* * handle allocation has 2 paths: