md: use __bio_add_page to add single page
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 31 May 2023 11:50:28 +0000 (04:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 31 May 2023 15:50:02 +0000 (09:50 -0600)
commit3c383235c51dcd6198d37ac3ac06e2acad79f981
treef6aab38fb75d23567e8c5dee9e3dc530a4e6afe5
parent741af75d4027b1229fc6e62f4e3c4378dfe04897
md: use __bio_add_page to add single page

The md-raid superblock writing code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is never
checked.

Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.

This brings us a step closer to marking bio_add_page() as __must_check.

Signed-of_-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/ca196f5e650e318106dbb4496eb6cbac4bc800bd.1685532726.git.johannes.thumshirn@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c