io_uring/rw: don't lose partial IO result on fail
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 21 Sep 2022 11:17:47 +0000 (12:17 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Sep 2022 19:15:02 +0000 (13:15 -0600)
commit47b4c68660752facfa6247b1fc9ca9d722b8b601
treed578f234cdbfaa7722112d92b222e08ee9dc7b76
parenta47b255e90395bdb481975ab3d9e96fcf8b3165f
io_uring/rw: don't lose partial IO result on fail

A partially done read/write may end up in io_req_complete_failed() and
loose the result, make sure we return the number of bytes processed.

Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/05e0879c226bcd53b441bf92868eadd4bf04e2fc.1663668091.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/opdef.c
io_uring/rw.c
io_uring/rw.h