Skip to content

Commit 4aabdc1

Browse files
Jaewon31Kimtorvalds
authored andcommitted
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/[email protected] Signed-off-by: Jaewon Kim <[email protected]> Reported-by: Yong-Taek Lee <[email protected]> Acked-by: Minchan Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d2c20e5 commit 4aabdc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/zram/zram_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec,
587587
{
588588
struct bio *bio;
589589

590-
bio = bio_alloc(GFP_ATOMIC, 1);
590+
bio = bio_alloc(GFP_NOIO, 1);
591591
if (!bio)
592592
return -ENOMEM;
593593

0 commit comments

Comments
 (0)