Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: simplify drain ret passing

"ret" in io_drain_req() is only used in one place, remove it and pass
-ENOMEM directly.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/ece724b77e66e6caabcc215e0032ee7ff140f289.1746788718.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
05b33411 fde04c7e

+1 -3
+1 -3
io_uring/io_uring.c
··· 1672 1672 { 1673 1673 struct io_ring_ctx *ctx = req->ctx; 1674 1674 struct io_defer_entry *de; 1675 - int ret; 1676 1675 u32 seq = io_get_sequence(req); 1677 1676 1678 1677 /* Still need defer if there is pending req in defer list. */ ··· 1688 1689 io_prep_async_link(req); 1689 1690 de = kmalloc(sizeof(*de), GFP_KERNEL_ACCOUNT); 1690 1691 if (!de) { 1691 - ret = -ENOMEM; 1692 - io_req_defer_failed(req, ret); 1692 + io_req_defer_failed(req, -ENOMEM); 1693 1693 return; 1694 1694 } 1695 1695