Skip to content

Commit

Permalink
zram-panic-when-use-ext4-over-zram-fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sergey-senozhatsky authored and akpm00 committed Dec 13, 2024
1 parent de99af3 commit e7955ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e7955ae

Please sign in to comment.