Skip to content

Commit 921b905

Browse files
isilenceaxboe
authored andcommitted
io_uring: don't duplicate io_req_task_queue()
Don't hand code io_req_task_queue() inside of io_async_buf_func(), just call it. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 4e32635 commit 921b905

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

fs/io_uring.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,7 +3494,6 @@ static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode,
34943494
struct wait_page_queue *wpq;
34953495
struct io_kiocb *req = wait->private;
34963496
struct wait_page_key *key = arg;
3497-
int ret;
34983497

34993498
wpq = container_of(wait, struct wait_page_queue, wait);
35003499

@@ -3504,14 +3503,9 @@ static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode,
35043503
req->rw.kiocb.ki_flags &= ~IOCB_WAITQ;
35053504
list_del_init(&wait->entry);
35063505

3507-
req->task_work.func = io_req_task_submit;
3508-
percpu_ref_get(&req->ctx->refs);
3509-
35103506
/* submit ref gets dropped, acquire a new one */
35113507
refcount_inc(&req->refs);
3512-
ret = io_req_task_work_add(req);
3513-
if (unlikely(ret))
3514-
io_req_task_work_add_fallback(req, io_req_task_cancel);
3508+
io_req_task_queue(req);
35153509
return 1;
35163510
}
35173511

0 commit comments

Comments
 (0)