]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/rw: preserve partial result for iopoll
authorMichael Wigham <michael@wigham.net>
Sat, 13 Jun 2026 22:52:16 +0000 (23:52 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Jun 2026 12:20:01 +0000 (06:20 -0600)
commitc554246ff4c68abf71b61a89c6e39d3cf94f523e
tree357f2fef0fcce65048e1571200a9212a0882ebf4
parent2564ca2e31bd8ee8348362941af2ee4671e487ca
io_uring/rw: preserve partial result for iopoll

A partial read will store the completed byte count in io->bytes_done.
The regular completion path applies io_fixup_rw_res() so that, when the
following operation reaches EOF, the number of bytes already read is
returned.

The iopoll completion path does not apply this fixup to the return value
and can return zero instead.

Use the fixup result when updating the CQE, and the raw result for the
reissue check.

Cc: stable@vger.kernel.org
Fixes: 4d9cb92ca41d ("io_uring/rw: fix short rw error handling")
Signed-off-by: Michael Wigham <michael@wigham.net>
Link: https://patch.msgid.link/20260613225240.34032-1-michael@wigham.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rw.c