projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e09ee51
)
io_uring: fix drain alloc fail return code
author
Pavel Begunkov
<asml.silence@gmail.com>
Wed, 7 Jul 2021 18:24:24 +0000
(19:24 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 7 Jul 2021 18:49:32 +0000
(12:49 -0600)
After a recent change io_drain_req() started to fail requests with
result=0 in case of allocation failure, where it should be and have
been -ENOMEM.
Fixes:
76cc33d79175a
("io_uring: refactor io_req_defer()")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/e068110ac4293e0c56cfc4d280d0f22b9303ec08.1625682153.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 88185608899031c574762bb71f1c02baae391327..8f2a66903f5ad7bce35e676a08885c3463231e97 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-6019,7
+6019,7
@@
static bool io_drain_req(struct io_kiocb *req)
io_prep_async_link(req);
de = kmalloc(sizeof(*de), GFP_KERNEL);
if (!de) {
- io_req_complete_failed(req,
ret
);
+ io_req_complete_failed(req,
-ENOMEM
);
return true;
}