Skip to content

Commit 1575f21

Browse files
committed
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: Jens Axboe <axboe@kernel.dk>
1 parent 4010fec commit 1575f21

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

fs/io_uring.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,8 +1080,6 @@ static bool io_match_task(struct io_kiocb *head,
10801080
return true;
10811081

10821082
io_for_each_link(req, head) {
1083-
if (!(req->flags & REQ_F_WORK_INITIALIZED))
1084-
continue;
10851083
if (req->file && req->file->f_op == &io_uring_fops)
10861084
return true;
10871085
if (req->task->files == files)
@@ -1800,15 +1798,7 @@ static void io_fail_links(struct io_kiocb *req)
18001798
trace_io_uring_fail_link(req, link);
18011799
io_cqring_fill_event(link, -ECANCELED);
18021800

1803-
/*
1804-
* It's ok to free under spinlock as they're not linked anymore,
1805-
* but avoid REQ_F_WORK_INITIALIZED because it may deadlock on
1806-
* work.fs->lock.
1807-
*/
1808-
if (link->flags & REQ_F_WORK_INITIALIZED)
1809-
io_put_req_deferred(link, 2);
1810-
else
1811-
io_double_put_req(link);
1801+
io_put_req_deferred(link, 2);
18121802
link = nxt;
18131803
}
18141804
io_commit_cqring(ctx);

0 commit comments

Comments
 (0)