iomap: Handle memory allocation failure in readahead
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 2 Apr 2020 16:08:53 +0000 (09:08 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Apr 2020 16:08:53 +0000 (09:08 -0700)
commit457df33e035a2cffc6561992f3f25a6c61605c46
tree3aa3c6f5ede2339ed4925a620aa7726c1a125502
parentd9973ce2fe5bcdc5e01bb3f49833d152b8e166ca
iomap: Handle memory allocation failure in readahead

bio_alloc() can fail when we use GFP_NORETRY.  If it does, allocate
a bio large enough for a single page like mpage_readpages() does.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/iomap/buffered-io.c