io_issue_sqe can reuse __io_req_complete for completion logic Signed-off-by: Dylan Yudaken <dylany@xxxxxxxx> --- io_uring/io_uring.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 03946f46dadc..2177b3ef094a 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1742,12 +1742,9 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags) if (creds) revert_creds(creds); - if (ret == IOU_OK) { - if (issue_flags & IO_URING_F_COMPLETE_DEFER) - io_req_complete_defer(req); - else - io_req_complete_post(req); - } else if (ret != IOU_ISSUE_SKIP_COMPLETE) + if (ret == IOU_OK) + __io_req_complete(req, issue_flags); + else if (ret != IOU_ISSUE_SKIP_COMPLETE) return ret; /* If the op doesn't have a file, we're not polling for it */ -- 2.30.2