diff options
| author | Ming Lei <ming.lei@redhat.com> | 2025-12-31 11:00:57 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-07 08:06:33 -0700 |
| commit | 15f506a77ad61ac3273ade9b7ef87af9bdba22ad (patch) | |
| tree | 352d8b1c3059813d2552af35013dff25c15aec84 /include/linux/leafops.h | |
| parent | 641864314866dff382f64cd8b52fd6bf4c4d84f6 (diff) | |
io_uring: remove nr_segs recalculation in io_import_kbuf()
io_import_kbuf() recalculates iter->nr_segs to reflect only the bvecs
needed for the requested byte range. This was added to provide an
accurate segment count to bio_iov_bvec_set(), which copied nr_segs to
bio->bi_vcnt for use as a bio split hint.
The previous two patches eliminated this dependency:
- bio_may_need_split() now uses bi_iter instead of bi_vcnt for split
decisions
- bio_iov_bvec_set() no longer copies nr_segs to bi_vcnt
Since nr_segs is no longer used for bio split decisions, the
recalculation loop is unnecessary. The iov_iter already has the correct
bi_size to cap iteration, so an oversized nr_segs is harmless.
Link: https://lkml.org/lkml/2025/4/16/351
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/leafops.h')
0 files changed, 0 insertions, 0 deletions
