]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: pick up link work on submit reference drop
authorJens Axboe <axboe@kernel.dk>
Tue, 25 Feb 2020 20:25:41 +0000 (13:25 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Feb 2020 14:05:30 +0000 (07:05 -0700)
commitf4f4a85b7590a228c3fb699c53b122b4f449d753
tree2f7e9657213e6df2d545e8567e007901b741530e
parent9b7d490788223e47ada5483109c323450df6a222
io_uring: pick up link work on submit reference drop

If work completes inline, then we should pick up a dependent link item
in __io_queue_sqe() as well. If we don't do so, we're forced to go async
with that item, which is suboptimal.

This also fixes an issue with io_put_req_find_next(), which always looks
up the next work item. That should only be done if we're dropping the
last reference to the request, to prevent multiple lookups of the same
work item.

Outside of being a fix, this also enables a good cleanup series for 5.7,
where we never have to pass 'nxt' around or into the work handlers.

Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c