]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/rsrc: remove unused parameter ctx for io_rsrc_node_alloc()
authorSidong Yang <sidong.yang@furiosa.ai>
Wed, 15 Jan 2025 14:20:31 +0000 (14:20 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2025 14:07:21 +0000 (07:07 -0700)
io_uring_ctx parameter for io_rsrc_node_alloc() is unused for now.
This patch removes the parameter and fixes the callers accordingly.

Signed-off-by: Sidong Yang <sidong.yang@furiosa.ai>
Link: https://lore.kernel.org/r/20250115142033.658599-1-sidong.yang@furiosa.ai
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/filetable.c
io_uring/rsrc.c
io_uring/rsrc.h

index a21660e3145abbe1325b769abe6ec3b4eadfb743..dd8eeec97acf66a64069b2f80c19f0a5edee7de5 100644 (file)
@@ -68,7 +68,7 @@ static int io_install_fixed_file(struct io_ring_ctx *ctx, struct file *file,
        if (slot_index >= ctx->file_table.data.nr)
                return -EINVAL;
 
-       node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE);
+       node = io_rsrc_node_alloc(IORING_RSRC_FILE);
        if (!node)
                return -ENOMEM;
 
index b5e47030764e569aab6184351a391fab8efbc584..a5fc035af8ff910d423930d7c662cc0e1a9f8444 100644 (file)
@@ -118,7 +118,7 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
        }
 }
 
-struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type)
+struct io_rsrc_node *io_rsrc_node_alloc(int type)
 {
        struct io_rsrc_node *node;
 
@@ -203,7 +203,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
                                err = -EBADF;
                                break;
                        }
-                       node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE);
+                       node = io_rsrc_node_alloc(IORING_RSRC_FILE);
                        if (!node) {
                                err = -ENOMEM;
                                fput(file);
@@ -525,7 +525,7 @@ int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
                        goto fail;
                }
                ret = -ENOMEM;
-               node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE);
+               node = io_rsrc_node_alloc(IORING_RSRC_FILE);
                if (!node) {
                        fput(file);
                        goto fail;
@@ -730,7 +730,7 @@ static struct io_rsrc_node *io_sqe_buffer_register(struct io_ring_ctx *ctx,
        if (!iov->iov_base)
                return NULL;
 
-       node = io_rsrc_node_alloc(ctx, IORING_RSRC_BUFFER);
+       node = io_rsrc_node_alloc(IORING_RSRC_BUFFER);
        if (!node)
                return ERR_PTR(-ENOMEM);
        node->buf = NULL;
@@ -1004,7 +1004,7 @@ static int io_clone_buffers(struct io_ring_ctx *ctx, struct io_ring_ctx *src_ctx
                if (!src_node) {
                        dst_node = NULL;
                } else {
-                       dst_node = io_rsrc_node_alloc(ctx, IORING_RSRC_BUFFER);
+                       dst_node = io_rsrc_node_alloc(IORING_RSRC_BUFFER);
                        if (!dst_node) {
                                ret = -ENOMEM;
                                goto out_free;
index c8b093584461810ce6726c87797a033840b6f3ac..5cd00b7baef8b03dd5f4a3aacee859b37db98e9b 100644 (file)
@@ -43,7 +43,7 @@ struct io_imu_folio_data {
        unsigned int    nr_folios;
 };
 
-struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type);
+struct io_rsrc_node *io_rsrc_node_alloc(int type);
 void io_free_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node);
 void io_rsrc_data_free(struct io_ring_ctx *ctx, struct io_rsrc_data *data);
 int io_rsrc_data_alloc(struct io_rsrc_data *data, unsigned nr);