diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-10-18 11:17:39 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-19 21:29:29 +0200 |
commit | d148ca4b07d05656f3b25b662f2283c4d98e7299 (patch) | |
tree | 6c001041fdbf6fe24a12508450aa0dafc60c9882 /fs | |
parent | io_uring: kill ref get/drop in personality init (diff) | |
download | linux-d148ca4b07d05656f3b25b662f2283c4d98e7299.tar.xz linux-d148ca4b07d05656f3b25b662f2283c4d98e7299.zip |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index b96ef251afaf..dce73e40eecb 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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 */ -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; + unsigned long flags; + spin_lock_irqsave(&ctx->completion_lock, flags); while (!list_empty(&req->link_list)) { struct io_kiocb *link = list_first_entry(&req->link_list, struct io_kiocb, link_list); @@ -1938,15 +1940,6 @@ static void __io_fail_links(struct io_kiocb *req) } 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); io_cqring_ev_posted(ctx); |