io_uring: cleanup io_aux_cqe() API
[platform/kernel/linux-starfive.git] / io_uring / net.c
index 0795f37..369167e 100644 (file)
@@ -632,8 +632,8 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
        }
 
        if (!mshot_finished) {
-               if (io_aux_cqe(req->ctx, issue_flags & IO_URING_F_COMPLETE_DEFER,
-                              req->cqe.user_data, *ret, cflags | IORING_CQE_F_MORE, true)) {
+               if (io_aux_cqe(req, issue_flags & IO_URING_F_COMPLETE_DEFER,
+                              *ret, cflags | IORING_CQE_F_MORE, true)) {
                        io_recv_prep_retry(req);
                        /* Known not-empty or unknown state, retry */
                        if (cflags & IORING_CQE_F_SOCK_NONEMPTY ||
@@ -1304,7 +1304,6 @@ int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
 
 int io_accept(struct io_kiocb *req, unsigned int issue_flags)
 {
-       struct io_ring_ctx *ctx = req->ctx;
        struct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept);
        bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
        unsigned int file_flags = force_nonblock ? O_NONBLOCK : 0;
@@ -1354,8 +1353,8 @@ retry:
 
        if (ret < 0)
                return ret;
-       if (io_aux_cqe(ctx, issue_flags & IO_URING_F_COMPLETE_DEFER,
-                      req->cqe.user_data, ret, IORING_CQE_F_MORE, true))
+       if (io_aux_cqe(req, issue_flags & IO_URING_F_COMPLETE_DEFER, ret,
+                      IORING_CQE_F_MORE, true))
                goto retry;
 
        return -ECANCELED;