diff options
| author | Chenliang Li <cliang01.li@samsung.com> | 2024-06-19 14:38:19 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-27 13:49:10 +0200 |
| commit | 2a215410cf593ff562d7ae814a90a91a0136ad0f (patch) | |
| tree | d5d04c8a605b6e75bebcf3bc983b9bdf09e0b71d /io_uring | |
| parent | 87e0621a6b3669030d78a2d899cd3576d6bf8470 (diff) | |
| download | linux-2a215410cf593ff562d7ae814a90a91a0136ad0f.tar.gz linux-2a215410cf593ff562d7ae814a90a91a0136ad0f.tar.bz2 linux-2a215410cf593ff562d7ae814a90a91a0136ad0f.zip | |
io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import_fixed
[ Upstream commit a23800f08a60787dfbf2b87b2e6ed411cb629859 ]
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: b000ae0ec2d7 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
| -rw-r--r-- | io_uring/rsrc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 2e88b6658e4e..0f9dcde72ebf 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -1108,7 +1108,6 @@ int io_import_fixed(int ddir, struct iov_iter *iter, * branch doesn't expect non PAGE_SIZE'd chunks. */ iter->bvec = bvec; - iter->nr_segs = bvec->bv_len; iter->count -= offset; iter->iov_offset = offset; } else { |
