io_uring/poll: remove 'ctx' argument from io_poll_req_delete()
authorJens Axboe <axboe@kernel.dk>
Mon, 30 Sep 2024 19:52:54 +0000 (13:52 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 Oct 2024 19:43:26 +0000 (13:43 -0600)
It's always req->ctx being used anyway, having this as a separate
argument (that is then not even used) just makes it more confusing.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/poll.c

index 1f63b60e85e7c07a20e86441b5bd0ea8d7dcf016..175c279e59ea8478c016fd9b13bf2a50b73c632e 100644 (file)
@@ -129,7 +129,7 @@ static void io_poll_req_insert(struct io_kiocb *req)
        spin_unlock(&hb->lock);
 }
 
-static void io_poll_req_delete(struct io_kiocb *req, struct io_ring_ctx *ctx)
+static void io_poll_req_delete(struct io_kiocb *req)
 {
        struct io_hash_table *table = &req->ctx->cancel_table;
        u32 index = hash_long(req->cqe.user_data, table->hash_bits);
@@ -165,7 +165,7 @@ static void io_poll_tw_hash_eject(struct io_kiocb *req, struct io_tw_state *ts)
                hash_del(&req->hash_node);
                req->flags &= ~REQ_F_HASH_LOCKED;
        } else {
-               io_poll_req_delete(req, ctx);
+               io_poll_req_delete(req);
        }
 }