On 31/12/25 11:00AM, Ming Lei wrote: >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 Reviewed-by: Nitesh Shetty