bio-integrity: cleanup adding integrity pages to bip's bvec.
authorJinyoung Choi <j-young.choi@samsung.com>
Thu, 3 Aug 2023 02:50:58 +0000 (11:50 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Aug 2023 22:05:35 +0000 (16:05 -0600)
commitd1f04c2e23c99258049c6081c3147bae69e5bcb8
treee1c7cb00a9dcfab06a1cc1d04ee62d27ca153ca9
parent80814b8e359f7207595f52702aea432a7bd61200
bio-integrity: cleanup adding integrity pages to bip's bvec.

bio_integrity_add_page() returns the add length if successful, else 0,
just as bio_add_page.  Simply check return value checking in
bio_integrity_prep to not deal with a > 0 but < len case that can't
happen.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
Tested-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Reviewed-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20230803025058epcms2p5a4d0db5da2ad967668932d463661c633@epcms2p5
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c