aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaewon Kim <[email protected]>2021-11-05 13:45:09 -0700
committerLinus Torvalds <[email protected]>2021-11-06 13:30:43 -0700
commit4aabdc14c4d2a01c2968bdc8919f81d9f9b4f790 (patch)
tree177bc6d1b9177b3d86a54555c706699154327f1d
parentd2c20e51e3966bc668ef1ef21fbe90704286c8d0 (diff)
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]>
-rw-r--r--drivers/block/zram/zram_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index fcaf2750f68f..081e77d595d7 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -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;