]> www.infradead.org Git - users/hch/block.git/commitdiff
io_uring: remove allow_overflow parameter
authorDylan Yudaken <dylany@meta.com>
Mon, 7 Nov 2022 12:52:36 +0000 (04:52 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 7 Nov 2022 20:17:17 +0000 (13:17 -0700)
It is now always true, so just remove it

Signed-off-by: Dylan Yudaken <dylany@meta.com>
Link: https://lore.kernel.org/r/20221107125236.260132-5-dylany@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h
io_uring/msg_ring.c
io_uring/net.c
io_uring/poll.c
io_uring/rsrc.c

index 112a5918e6537a52313884f146075f6d514a6155..19a17d3199018d24d91a63a2e42a886ace279a48 100644 (file)
@@ -773,8 +773,7 @@ struct io_uring_cqe *__io_get_cqe(struct io_ring_ctx *ctx, bool overflow)
        return &rings->cqes[off];
 }
 
-bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags,
-                    bool allow_overflow)
+bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags)
 {
        struct io_uring_cqe *cqe;
 
@@ -800,20 +799,16 @@ bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags
                return true;
        }
 
-       if (allow_overflow)
-               return io_cqring_event_overflow(ctx, user_data, res, cflags, 0, 0);
-
-       return false;
+       return io_cqring_event_overflow(ctx, user_data, res, cflags, 0, 0);
 }
 
 bool io_post_aux_cqe(struct io_ring_ctx *ctx,
-                    u64 user_data, s32 res, u32 cflags,
-                    bool allow_overflow)
+                    u64 user_data, s32 res, u32 cflags)
 {
        bool filled;
 
        io_cq_lock(ctx);
-       filled = io_fill_cqe_aux(ctx, user_data, res, cflags, allow_overflow);
+       filled = io_fill_cqe_aux(ctx, user_data, res, cflags);
        io_cq_unlock_post(ctx);
        return filled;
 }
index e99a79f2df9b18365559d6623133f77fdb60e3a6..d14534a2f8e78a68f20dd9771ed652d64f436179 100644 (file)
@@ -33,10 +33,8 @@ void io_req_complete_failed(struct io_kiocb *req, s32 res);
 void __io_req_complete(struct io_kiocb *req, unsigned issue_flags);
 void io_req_complete_post(struct io_kiocb *req);
 void __io_req_complete_post(struct io_kiocb *req);
-bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags,
-                    bool allow_overflow);
-bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags,
-                    bool allow_overflow);
+bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags);
+bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags);
 void __io_commit_cqring_flush(struct io_ring_ctx *ctx);
 
 struct page **io_pin_pages(unsigned long ubuf, unsigned long len, int *npages);
index 90d2fc6fd80e4a04a291c91fc0e682b9974fb547..afb543aab9f6321f73ef1b68b7b1c19efcdd18e9 100644 (file)
@@ -31,7 +31,7 @@ static int io_msg_ring_data(struct io_kiocb *req)
        if (msg->src_fd || msg->dst_fd || msg->flags)
                return -EINVAL;
 
-       if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0, true))
+       if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))
                return 0;
 
        return -EOVERFLOW;
@@ -116,7 +116,7 @@ static int io_msg_send_fd(struct io_kiocb *req, unsigned int issue_flags)
         * completes with -EOVERFLOW, then the sender must ensure that a
         * later IORING_OP_MSG_RING delivers the message.
         */
-       if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0, true))
+       if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0))
                ret = -EOVERFLOW;
 out_unlock:
        io_double_unlock_ctx(ctx, target_ctx, issue_flags);
index 4b79b61f5597073897faf0672de3bad76f1df79a..a1a0b8f223e000d862befbb239720351fded6fde 100644 (file)
@@ -603,7 +603,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
 
        if (!mshot_finished) {
                if (io_post_aux_cqe(req->ctx, req->cqe.user_data, *ret,
-                                   cflags | IORING_CQE_F_MORE, true)) {
+                                   cflags | IORING_CQE_F_MORE)) {
                        io_recv_prep_retry(req);
                        return false;
                }
@@ -1323,7 +1323,7 @@ retry:
 
        if (ret < 0)
                return ret;
-       if (io_post_aux_cqe(ctx, req->cqe.user_data, ret, IORING_CQE_F_MORE, true))
+       if (io_post_aux_cqe(ctx, req->cqe.user_data, ret, IORING_CQE_F_MORE))
                goto retry;
        return -ECANCELED;
 }
index e1b8652b670f2e57264520fde9120524da106126..d00c8dc76d348940389e9f91033165568069e327 100644 (file)
@@ -244,7 +244,7 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked)
                                                    req->apoll_events);
 
                        if (!io_post_aux_cqe(ctx, req->cqe.user_data,
-                                            mask, IORING_CQE_F_MORE, true))
+                                            mask, IORING_CQE_F_MORE))
                                return -ECANCELED;
                } else {
                        ret = io_poll_issue(req, locked);
index 187f1c83e7798ab3c58ace2b7a9a105bfad9e3cf..133608200769cc3b82768e3186d457d57c41c823 100644 (file)
@@ -170,10 +170,10 @@ static void __io_rsrc_put_work(struct io_rsrc_node *ref_node)
                if (prsrc->tag) {
                        if (ctx->flags & IORING_SETUP_IOPOLL) {
                                mutex_lock(&ctx->uring_lock);
-                               io_post_aux_cqe(ctx, prsrc->tag, 0, 0, true);
+                               io_post_aux_cqe(ctx, prsrc->tag, 0, 0);
                                mutex_unlock(&ctx->uring_lock);
                        } else {
-                               io_post_aux_cqe(ctx, prsrc->tag, 0, 0, true);
+                               io_post_aux_cqe(ctx, prsrc->tag, 0, 0);
                        }
                }