io_uring: get next work with submission ref drop
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 3 Mar 2020 18:33:13 +0000 (21:33 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Mar 2020 03:02:49 +0000 (20:02 -0700)
commit7a743e225b2a9da772b28a50031e1ccd8a8ce404
tree93040486f98e7ace0000767e50d7afe38a9d073c
parent014db0073cc6a12e1f421b9231d6f3aa35735823
io_uring: get next work with submission ref drop

If after dropping the submission reference req->refs == 1, the request
is done, because this one is for io_put_work() and will be dropped
synchronously shortly after. In this case it's safe to steal a next
work from the request.

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