diff options
author | Christoph Hellwig <[email protected]> | 2023-07-24 09:54:30 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-07-24 19:55:16 -0600 |
commit | 613699050a49760f1d70c74f71bd0b013ca3c356 (patch) | |
tree | 1117f66979ad0ad87e929850920077c7debf8eaa /net/lapb/lapb_subr.c | |
parent | 0eca8b6f97ac705c5806f7d062207379094fb114 (diff) |
block: move the bi_size overflow check in __bio_try_merge_page
Checking for availability in bi_size in a function that attempts to
merge into an existing segment is a bit odd, as the limit also applies
when adding a new segment. This code works fine as we always call
__bio_try_merge_page, but contributes to sub-optimal calling conventions
and doesn't lead to clear code.
Move it to two of the callers instead, the third one already has a more
strict check that includes max_hw_segments anyway.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jinyoung Choi <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions