mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-23 03:27:58 +07:00
io_uring: simplify io_req_link_next()
"if (nxt)" is always true, as it was checked in the while's condition. io_wq_current_is_worker() is unnecessary, as non-async callers don't pass nxt, so io_queue_async_work() will be called for them anyway. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
944e58bfed
commit
b18fdf71e0
@ -903,16 +903,7 @@ static void io_req_link_next(struct io_kiocb *req, struct io_kiocb **nxtptr)
|
|||||||
nxt->flags |= REQ_F_LINK;
|
nxt->flags |= REQ_F_LINK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* If we're in async work, we can continue processing the chain
|
|
||||||
* in this context instead of having to queue up new async work.
|
|
||||||
*/
|
|
||||||
if (nxt) {
|
|
||||||
if (io_wq_current_is_worker())
|
|
||||||
*nxtptr = nxt;
|
*nxtptr = nxt;
|
||||||
else
|
|
||||||
io_queue_async_work(nxt);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user