Skip to content

Commit a23800f

Browse files
Chenliang Liaxboe
authored andcommitted
io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import_fixed
In io_import_fixed when advancing the iter within the first bvec, the iter->nr_segs is set to bvec->bv_len. nr_segs should be the number of bvecs, plus we don't need to adjust it here, so just remove it. Fixes: b000ae0 ("io_uring/rsrc: optimise single entry advance") Signed-off-by: Chenliang Li <cliang01.li@samsung.com> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/20240619063819.2445-1-cliang01.li@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f4a1254 commit a23800f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

io_uring/rsrc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,6 @@ int io_import_fixed(int ddir, struct iov_iter *iter,
10681068
* branch doesn't expect non PAGE_SIZE'd chunks.
10691069
*/
10701070
iter->bvec = bvec;
1071-
iter->nr_segs = bvec->bv_len;
10721071
iter->count -= offset;
10731072
iter->iov_offset = offset;
10741073
} else {

0 commit comments

Comments
 (0)