diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-03-19 17:22:38 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-11 17:41:59 -0600 |
commit | a05432fb49b6439d0c5b803053dfdd875940116d (patch) | |
tree | c652e4c0ec42e4cdb851449940544b75ae14d5c9 /fs/io_uring.c | |
parent | 0d85035a7368a6c6dc91ddeca6da12a50d24164e (diff) | |
download | lwn-a05432fb49b6439d0c5b803053dfdd875940116d.tar.gz lwn-a05432fb49b6439d0c5b803053dfdd875940116d.zip |
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>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 74ba816ba71d..08ab7c4830d5 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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) { - int ret; - req->task_work.func = io_put_req_deferred_cb; - ret = io_req_task_work_add(req); - if (unlikely(ret)) + if (unlikely(io_req_task_work_add(req))) io_req_task_work_add_fallback(req, io_put_req_deferred_cb); } |