For consistency always defer completion if specified in the issue flags. Signed-off-by: Dylan Yudaken <dylany@xxxxxxxx> --- io_uring/io_uring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index f15aca039db6..208afb944b0c 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -862,7 +862,10 @@ void io_req_complete_post(struct io_kiocb *req) inline void __io_req_complete(struct io_kiocb *req, unsigned issue_flags) { - io_req_complete_post(req); + if (issue_flags & IO_URING_F_COMPLETE_DEFER) + io_req_complete_defer(req); + else + io_req_complete_post(req); } void io_req_complete_failed(struct io_kiocb *req, s32 res) -- 2.30.2