summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-07-24 18:54:30 +0200
committerJens Axboe <axboe@kernel.dk>2023-07-25 03:55:16 +0200
commit613699050a49760f1d70c74f71bd0b013ca3c356 (patch)
tree1117f66979ad0ad87e929850920077c7debf8eaa /block/blk-cgroup.c
parentblock: move the bi_vcnt check out of __bio_try_merge_page (diff)
downloadlinux-613699050a49760f1d70c74f71bd0b013ca3c356.tar.xz
linux-613699050a49760f1d70c74f71bd0b013ca3c356.zip
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 <hch@lst.de> Reviewed-by: Jinyoung Choi <j-young.choi@samsung.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20230724165433.117645-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
0 files changed, 0 insertions, 0 deletions