Commit 1b48773f authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

io_uring: fix io_drain_req()

io_drain_req() return whether the request has been consumed or not, not
an error code. Fix a stupid mistake slipped from optimisation patches.

Fixes: 76cc33d7

 ("io_uring: refactor io_req_defer()")
Signed-off-by: default avatarPavel Begunkov <>

Signed-off-by: default avatarJens Axboe <>
parent 9c688260
......@@ -6019,11 +6019,13 @@ static bool io_drain_req(struct io_kiocb *req)
ret = io_req_prep_async(req);
if (ret)
return ret;
goto fail;
de = kmalloc(sizeof(*de), GFP_KERNEL);
if (!de) {
io_req_complete_failed(req, -ENOMEM);
ret = -ENOMEM;
io_req_complete_failed(req, ret);
return true;
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