Commit 1575f21a authored by Jens Axboe's avatar Jens Axboe

io_uring: kill unnecessary REQ_F_WORK_INITIALIZED checks

We're no longer checking anything that requires the work item to be
initialized, as we're not carrying any file related state there.
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4010fec4
...@@ -1080,8 +1080,6 @@ static bool io_match_task(struct io_kiocb *head, ...@@ -1080,8 +1080,6 @@ static bool io_match_task(struct io_kiocb *head,
return true; return true;
io_for_each_link(req, head) { io_for_each_link(req, head) {
if (!(req->flags & REQ_F_WORK_INITIALIZED))
continue;
if (req->file && req->file->f_op == &io_uring_fops) if (req->file && req->file->f_op == &io_uring_fops)
return true; return true;
if (req->task->files == files) if (req->task->files == files)
...@@ -1800,15 +1798,7 @@ static void io_fail_links(struct io_kiocb *req) ...@@ -1800,15 +1798,7 @@ static void io_fail_links(struct io_kiocb *req)
trace_io_uring_fail_link(req, link); trace_io_uring_fail_link(req, link);
io_cqring_fill_event(link, -ECANCELED); io_cqring_fill_event(link, -ECANCELED);
/* io_put_req_deferred(link, 2);
* It's ok to free under spinlock as they're not linked anymore,
* but avoid REQ_F_WORK_INITIALIZED because it may deadlock on
* work.fs->lock.
*/
if (link->flags & REQ_F_WORK_INITIALIZED)
io_put_req_deferred(link, 2);
else
io_double_put_req(link);
link = nxt; link = nxt;
} }
io_commit_cqring(ctx); io_commit_cqring(ctx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment