Commit 921b9054 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4e326358
...@@ -3494,7 +3494,6 @@ static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode, ...@@ -3494,7 +3494,6 @@ static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode,
struct wait_page_queue *wpq; struct wait_page_queue *wpq;
struct io_kiocb *req = wait->private; struct io_kiocb *req = wait->private;
struct wait_page_key *key = arg; struct wait_page_key *key = arg;
int ret;
wpq = container_of(wait, struct wait_page_queue, wait); wpq = container_of(wait, struct wait_page_queue, wait);
...@@ -3504,14 +3503,9 @@ static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode, ...@@ -3504,14 +3503,9 @@ static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode,
req->rw.kiocb.ki_flags &= ~IOCB_WAITQ; req->rw.kiocb.ki_flags &= ~IOCB_WAITQ;
list_del_init(&wait->entry); list_del_init(&wait->entry);
req->task_work.func = io_req_task_submit;
percpu_ref_get(&req->ctx->refs);
/* submit ref gets dropped, acquire a new one */ /* submit ref gets dropped, acquire a new one */
refcount_inc(&req->refs); refcount_inc(&req->refs);
ret = io_req_task_work_add(req); io_req_task_queue(req);
if (unlikely(ret))
io_req_task_work_add_fallback(req, io_req_task_cancel);
return 1; return 1;
} }
......
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