summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaewon Kim <jaewon31.kim@samsung.com>2021-11-05 21:45:09 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-06 21:30:43 +0100
commit4aabdc14c4d2a01c2968bdc8919f81d9f9b4f790 (patch)
tree177bc6d1b9177b3d86a54555c706699154327f1d
parentmm/highmem: remove deprecated kmap_atomic (diff)
downloadlinux-4aabdc14c4d2a01c2968bdc8919f81d9f9b4f790.tar.xz
linux-4aabdc14c4d2a01c2968bdc8919f81d9f9b4f790.zip
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.com Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com> Reported-by: Yong-Taek Lee <ytk.lee@samsung.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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;