return __io_fill_cqe(ctx, user_data, res, cflags);
 }
 
-static void io_req_complete_post(struct io_kiocb *req, s32 res,
-                                u32 cflags)
+static void __io_req_complete_post(struct io_kiocb *req, s32 res,
+                                  u32 cflags)
 {
        struct io_ring_ctx *ctx = req->ctx;
 
-       spin_lock(&ctx->completion_lock);
        if (!(req->flags & REQ_F_CQE_SKIP))
                __io_fill_cqe(ctx, req->user_data, res, cflags);
        /*
                wq_list_add_head(&req->comp_list, &ctx->locked_free_list);
                ctx->locked_free_nr++;
        }
+}
+
+static void io_req_complete_post(struct io_kiocb *req, s32 res,
+                                u32 cflags)
+{
+       struct io_ring_ctx *ctx = req->ctx;
+
+       spin_lock(&ctx->completion_lock);
+       __io_req_complete_post(req, res, cflags);
        io_commit_cqring(ctx);
        spin_unlock(&ctx->completion_lock);
        io_cqring_ev_posted(ctx);