diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-01-10 10:05:32 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-01-10 11:46:48 -0700 |
commit | fe80eb15dea5125ea64845c9de0dd7f8478dd267 (patch) | |
tree | 6ab79b33a63360173c7eb14e7553a849963c6b24 /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |
parent | 6ff1407e24e6fdfa4a16ba9ba551e3d253a26391 (diff) |
io_uring/rw: cleanup io_rw_done()
This originally came from the aio side, and it's laid out rather oddly.
The common case here is that we either get -EIOCBQUEUED from submitting
an async request, or that we complete the request correctly with the
given number of bytes. Handling the odd internal restart error codes
is not a common operation.
Lay it out a bit more optimally that better explains the normal flow,
and switch to avoiding the indirect call completely as this is our
kiocb and we know the completion handler can only be one of two
possible variants. While at it, move it to where it belongs in the
file, with fellow end IO helpers.
Outside of being easier to read, this also reduces the text size of the
function by 24 bytes for me on arm64.
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
0 files changed, 0 insertions, 0 deletions