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/[email protected]
Signed-off-by: Sergey Senozhatsky <[email protected]>
Cc: caiqingfu <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
sergey-senozhatsky authored and akpm00 committed Dec 11, 2024
1 parent 2f5166a commit 62a8255
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 62a8255

Please sign in to comment.