mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
io_uring: refactor io_free_req_deferred()
We don't care about ret value in io_free_req_deferred(), make the code a bit more concise. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
0d85035a73
commit
a05432fb49
@ -2192,11 +2192,8 @@ static void io_put_req_deferred_cb(struct callback_head *cb)
|
|||||||
|
|
||||||
static void io_free_req_deferred(struct io_kiocb *req)
|
static void io_free_req_deferred(struct io_kiocb *req)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
req->task_work.func = io_put_req_deferred_cb;
|
req->task_work.func = io_put_req_deferred_cb;
|
||||||
ret = io_req_task_work_add(req);
|
if (unlikely(io_req_task_work_add(req)))
|
||||||
if (unlikely(ret))
|
|
||||||
io_req_task_work_add_fallback(req, io_put_req_deferred_cb);
|
io_req_task_work_add_fallback(req, io_put_req_deferred_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user