Skip to content
Commit b419bed4 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/rsrc: ensure segments counts are correct on kbuf buffers



kbuf imports have the front offset adjusted and segments removed, but
the tail segments are still included in the segment count that gets
passed in the iov_iter. As the segments aren't necessarily all the
same size, move importing to a separate helper and iterate the
mapped length to get an exact count.

Reviewed-by: default avatarNitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 80c7378f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment