Skip to content

Commit b73de0d

Browse files
SidongYangaxboe
authored andcommitted
io_uring/rsrc: remove unused parameter ctx for io_rsrc_node_alloc()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent bb2d763 commit b73de0d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

io_uring/filetable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int io_install_fixed_file(struct io_ring_ctx *ctx, struct file *file,
6868
if (slot_index >= ctx->file_table.data.nr)
6969
return -EINVAL;
7070

71-
node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE);
71+
node = io_rsrc_node_alloc(IORING_RSRC_FILE);
7272
if (!node)
7373
return -ENOMEM;
7474

io_uring/rsrc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
118118
}
119119
}
120120

121-
struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type)
121+
struct io_rsrc_node *io_rsrc_node_alloc(int type)
122122
{
123123
struct io_rsrc_node *node;
124124

@@ -203,7 +203,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
203203
err = -EBADF;
204204
break;
205205
}
206-
node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE);
206+
node = io_rsrc_node_alloc(IORING_RSRC_FILE);
207207
if (!node) {
208208
err = -ENOMEM;
209209
fput(file);
@@ -525,7 +525,7 @@ int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
525525
goto fail;
526526
}
527527
ret = -ENOMEM;
528-
node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE);
528+
node = io_rsrc_node_alloc(IORING_RSRC_FILE);
529529
if (!node) {
530530
fput(file);
531531
goto fail;
@@ -730,7 +730,7 @@ static struct io_rsrc_node *io_sqe_buffer_register(struct io_ring_ctx *ctx,
730730
if (!iov->iov_base)
731731
return NULL;
732732

733-
node = io_rsrc_node_alloc(ctx, IORING_RSRC_BUFFER);
733+
node = io_rsrc_node_alloc(IORING_RSRC_BUFFER);
734734
if (!node)
735735
return ERR_PTR(-ENOMEM);
736736
node->buf = NULL;
@@ -1004,7 +1004,7 @@ static int io_clone_buffers(struct io_ring_ctx *ctx, struct io_ring_ctx *src_ctx
10041004
if (!src_node) {
10051005
dst_node = NULL;
10061006
} else {
1007-
dst_node = io_rsrc_node_alloc(ctx, IORING_RSRC_BUFFER);
1007+
dst_node = io_rsrc_node_alloc(IORING_RSRC_BUFFER);
10081008
if (!dst_node) {
10091009
ret = -ENOMEM;
10101010
goto out_free;

io_uring/rsrc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct io_imu_folio_data {
4343
unsigned int nr_folios;
4444
};
4545

46-
struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type);
46+
struct io_rsrc_node *io_rsrc_node_alloc(int type);
4747
void io_free_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node);
4848
void io_rsrc_data_free(struct io_ring_ctx *ctx, struct io_rsrc_data *data);
4949
int io_rsrc_data_alloc(struct io_rsrc_data *data, unsigned nr);

0 commit comments

Comments
 (0)