io_uring: pass only !null to io_req_find_next()
Make io_req_find_next() and io_req_link_next() to accept only non-null nxt, and handle it in callers. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>alistair/sunxi64-5.5-dsi
parent
70cf9f3270
commit
944e58bfed
|
@ -908,7 +908,7 @@ static void io_req_link_next(struct io_kiocb *req, struct io_kiocb **nxtptr)
|
||||||
* in this context instead of having to queue up new async work.
|
* in this context instead of having to queue up new async work.
|
||||||
*/
|
*/
|
||||||
if (nxt) {
|
if (nxt) {
|
||||||
if (nxtptr && io_wq_current_is_worker())
|
if (io_wq_current_is_worker())
|
||||||
*nxtptr = nxt;
|
*nxtptr = nxt;
|
||||||
else
|
else
|
||||||
io_queue_async_work(nxt);
|
io_queue_async_work(nxt);
|
||||||
|
@ -986,8 +986,13 @@ static void io_req_find_next(struct io_kiocb *req, struct io_kiocb **nxt)
|
||||||
|
|
||||||
static void io_free_req(struct io_kiocb *req)
|
static void io_free_req(struct io_kiocb *req)
|
||||||
{
|
{
|
||||||
io_req_find_next(req, NULL);
|
struct io_kiocb *nxt = NULL;
|
||||||
|
|
||||||
|
io_req_find_next(req, &nxt);
|
||||||
__io_free_req(req);
|
__io_free_req(req);
|
||||||
|
|
||||||
|
if (nxt)
|
||||||
|
io_queue_async_work(nxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue