]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix index calculation
authorDylan Yudaken <dylany@fb.com>
Mon, 13 Jun 2022 10:11:55 +0000 (03:11 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Jun 2022 11:13:09 +0000 (05:13 -0600)
commitca35d4b16fc28fad3445c79b35e77b16a5a21041
treeacc0f4d6caf1da567fd63808e7901f267a452f8e
parent71374b58ebc7666369d670c06d1176f81c437c59
io_uring: fix index calculation

When indexing into a provided buffer ring, do not subtract 1 from the
index.

Fixes: e790404d1245 ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220613101157.3687-2-dylany@fb.com
Reviewed-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c