| From: Sergey Senozhatsky <senozhatsky@chromium.org> |
| Subject: zram-panic-when-use-ext4-over-zram-fix |
| Date: Tue, 10 Dec 2024 18:38:35 +0900 |
| |
| simplify zram_write_page() -ENOMEM return |
| |
| Link: https://lkml.kernel.org/r/20241210093835.GN16709@google.com |
| Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> |
| Cc: caiqingfu <caiqingfu@ruijie.com.cn> |
| Cc: Minchan Kim <minchan@kernel.org> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| drivers/block/zram/zram_drv.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/block/zram/zram_drv.c~zram-panic-when-use-ext4-over-zram-fix |
| +++ a/drivers/block/zram/zram_drv.c |
| @@ -1668,7 +1668,7 @@ compress_again: |
| |
| 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: |
| _ |