btrfs: use __bio_add_page to add single a page in rbio_add_io_sector
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 30 Mar 2023 10:43:51 +0000 (03:43 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:20 +0000 (18:01 +0200)
commitcf32e41fa5f4fb88e4b4acf9cbf3acf9ac362553
tree0b56470329bb47f069ef70303844290e24314e55
parent078e4cf5dbedb3d407417a10ac5918dca6ca156a
btrfs: use __bio_add_page to add single a page in rbio_add_io_sector

The btrfs raid56 sector submission 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.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c