Commit 4aabdc14 authored by Jaewon Kim's avatar Jaewon Kim Committed by Linus Torvalds

zram_drv: allow reclaim on bio_alloc

The read_from_bdev_async is not called on atomic context.  So GFP_NOIO
is available rather than GFP_ATOMIC.  If there were reclaimable pages
with GFP_NOIO, we can avoid allocation failure and page fault failure.

Link: https://lkml.kernel.org/r/20210908005241.28062-1-jaewon31.kim@samsung.comSigned-off-by: default avatarJaewon Kim <jaewon31.kim@samsung.com>
Reported-by: default avatarYong-Taek Lee <ytk.lee@samsung.com>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d2c20e51
......@@ -587,7 +587,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec,
{
struct bio *bio;
bio = bio_alloc(GFP_ATOMIC, 1);
bio = bio_alloc(GFP_NOIO, 1);
if (!bio)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment