Skip to content
Commit 34cdb8c8 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

block: ensure bio_iov_add_page can't fail



Adding the page could fail on the bio_full() condition, which checks for
either exceeding the bio's max segments or total size exceeding
UINT_MAX. We already ensure the max segments can't be exceeded, so just
ensure the total size won't reach the limit. This simplifies error
handling and removes unnecessary repeated bio_full() checks.

Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20220712153256.2202024-2-kbusch@fb.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 325347d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment