block: mark bio_add_page as __must_check
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 31 May 2023 11:50:40 +0000 (04:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Jun 2023 15:13:31 +0000 (09:13 -0600)
Now that all users of bio_add_page check for the return value, mark
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: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/7ae4a902e08fe2e90c012ee07aeb35d4aae28373.1685532726.git.johannes.thumshirn@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/bio.h

index 8588bcfbc6eff518fa2227a8dbb188be814f081e..d63f0bb47c6509e53eeccca8636866d9e5208763 100644 (file)
@@ -465,7 +465,8 @@ extern void bio_uninit(struct bio *);
 void bio_reset(struct bio *bio, struct block_device *bdev, blk_opf_t opf);
 void bio_chain(struct bio *, struct bio *);
 
-int bio_add_page(struct bio *, struct page *, unsigned len, unsigned off);
+int __must_check bio_add_page(struct bio *bio, struct page *page, unsigned len,
+                             unsigned off);
 bool bio_add_folio(struct bio *, struct folio *, size_t len, size_t off);
 extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
                           unsigned int, unsigned int);