io_uring: inline io_fail_links()
Inline io_fail_links() and kill extra io_cqring_ev_posted(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
ec99ca6c47
commit
d148ca4b07
@ -1913,10 +1913,12 @@ static struct io_kiocb *io_req_link_next(struct io_kiocb *req)
|
|||||||
/*
|
/*
|
||||||
* Called if REQ_F_LINK_HEAD is set, and we fail the head request
|
* Called if REQ_F_LINK_HEAD is set, and we fail the head request
|
||||||
*/
|
*/
|
||||||
static void __io_fail_links(struct io_kiocb *req)
|
static void io_fail_links(struct io_kiocb *req)
|
||||||
{
|
{
|
||||||
struct io_ring_ctx *ctx = req->ctx;
|
struct io_ring_ctx *ctx = req->ctx;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&ctx->completion_lock, flags);
|
||||||
while (!list_empty(&req->link_list)) {
|
while (!list_empty(&req->link_list)) {
|
||||||
struct io_kiocb *link = list_first_entry(&req->link_list,
|
struct io_kiocb *link = list_first_entry(&req->link_list,
|
||||||
struct io_kiocb, link_list);
|
struct io_kiocb, link_list);
|
||||||
@ -1938,15 +1940,6 @@ static void __io_fail_links(struct io_kiocb *req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
io_commit_cqring(ctx);
|
io_commit_cqring(ctx);
|
||||||
}
|
|
||||||
|
|
||||||
static void io_fail_links(struct io_kiocb *req)
|
|
||||||
{
|
|
||||||
struct io_ring_ctx *ctx = req->ctx;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&ctx->completion_lock, flags);
|
|
||||||
__io_fail_links(req);
|
|
||||||
spin_unlock_irqrestore(&ctx->completion_lock, flags);
|
spin_unlock_irqrestore(&ctx->completion_lock, flags);
|
||||||
|
|
||||||
io_cqring_ev_posted(ctx);
|
io_cqring_ev_posted(ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user