Skip to content

Commit 752d422

Browse files
committed
Merge tag 'for-5.18/alloc-cleanups-2022-03-25' of git://git.kernel.dk/linux-block
Pull bio allocation fix from Jens Axboe: "We got some reports of users seeing: Unexpected gfp: 0x2 (__GFP_HIGHMEM). Fixing up to gfp: 0x1192888 which is a regression caused by the bio allocation cleanups" * tag 'for-5.18/alloc-cleanups-2022-03-25' of git://git.kernel.dk/linux-block: fs: do not pass __GFP_HIGHMEM to bio_alloc in do_mpage_readpage
2 parents 561593a + 61285ff commit 752d422

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/mpage.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,11 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
148148
int op = REQ_OP_READ;
149149
unsigned nblocks;
150150
unsigned relative_block;
151-
gfp_t gfp;
151+
gfp_t gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL);
152152

153153
if (args->is_readahead) {
154154
op |= REQ_RAHEAD;
155-
gfp = readahead_gfp_mask(page->mapping);
156-
} else {
157-
gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL);
155+
gfp |= __GFP_NORETRY | __GFP_NOWARN;
158156
}
159157

160158
if (page_has_buffers(page))

0 commit comments

Comments
 (0)