fs: iomap: use bio_add_folio_nofail where possible
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 31 May 2023 11:50:42 +0000 (04:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Jun 2023 15:13:31 +0000 (09:13 -0600)
commitc2478469f2bb821a268bd02cae5b2af1c119c9bd
tree78fc31735dc93b082664c59169ca47c1e609ebf5
parent7a150f1ed19b709837e98571f49ab1ff2625ca89
fs: iomap: use bio_add_folio_nofail where possible

When the iomap buffered-io code can't add a folio to a bio, it allocates a
new bio and adds the folio to that one. This is done using bio_add_folio(),
but doesn't check for errors.

As adding a folio to a newly created bio can't fail, use the newly
introduced bio_add_folio_nofail() function.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/58fa893c24c67340a63323f09a179fefdca07f2a.1685532726.git.johannes.thumshirn@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/iomap/buffered-io.c