For consistency always defer completion if specified in the issue flags. Signed-off-by: Dylan Yudaken <dylany@xxxxxxxx> --- io_uring/io_uring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index cc27413129fc..ec23ebb63489 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -852,7 +852,9 @@ static void __io_req_complete_post(struct io_kiocb *req) void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags) { - if (!(issue_flags & IO_URING_F_UNLOCKED) || + if (issue_flags & IO_URING_F_COMPLETE_DEFER) { + io_req_complete_defer(req); + } else if (!(issue_flags & IO_URING_F_UNLOCKED) || !(req->ctx->flags & IORING_SETUP_IOPOLL)) { __io_req_complete_post(req); } else { -- 2.30.2