android_kernel_xiaomi_sm8450/io_uring
Dylan Yudaken ea528ecac3 io_uring: update kiocb->ki_pos at execution time
commit d34e1e5b396a0dbaa4a29b7138df662cfb9d8e8e upstream.

Update kiocb->ki_pos at execution time rather than in io_prep_rw().
io_prep_rw() happens before the job is enqueued to a worker and so the
offset might be read multiple times before being executed once.

Ensures that the file position in a set of _linked_ SQEs will be only
obtained after earlier SQEs have completed, and so will include their
incremented file position.

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-24 07:19:57 +01:00
..
io_uring.c io_uring: update kiocb->ki_pos at execution time 2023-01-24 07:19:57 +01:00
io-wq.c io_uring: don't gate task_work run on TIF_NOTIFY_SIGNAL 2023-01-24 07:19:56 +01:00
io-wq.h
Makefile