summaryrefslogtreecommitdiff
path: root/io_uring/filetable.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-18 16:06:35 +0300
committerJens Axboe <axboe@kernel.dk>2023-04-19 04:38:26 +0300
commit63fea89027ff4fd4f350b471ad5b9220d373eec5 (patch)
treecb51c9725785eacedafb8c8619481b5cadaa32b2 /io_uring/filetable.c
parent2e6f45ac0e640bbd49296adfa0982c84f85fa342 (diff)
downloadlinux-63fea89027ff4fd4f350b471ad5b9220d373eec5.tar.xz
io_uring/rsrc: infer node from ctx on io_queue_rsrc_removal
For io_queue_rsrc_removal() we should always use the current active rsrc node, don't pass it directly but let the function grab it from the context. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d15939b4afea730978b4925685c2577538b823bb.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/filetable.c')
-rw-r--r--io_uring/filetable.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/io_uring/filetable.c b/io_uring/filetable.c
index 6255fa255ae2..367a44a6c8c5 100644
--- a/io_uring/filetable.c
+++ b/io_uring/filetable.c
@@ -85,8 +85,7 @@ static int io_install_fixed_file(struct io_ring_ctx *ctx, struct file *file,
return ret;
old_file = (struct file *)(file_slot->file_ptr & FFS_MASK);
- ret = io_queue_rsrc_removal(ctx->file_data, slot_index,
- ctx->rsrc_node, old_file);
+ ret = io_queue_rsrc_removal(ctx->file_data, slot_index, old_file);
if (ret)
return ret;
@@ -163,7 +162,7 @@ int io_fixed_fd_remove(struct io_ring_ctx *ctx, unsigned int offset)
return -EBADF;
file = (struct file *)(file_slot->file_ptr & FFS_MASK);
- ret = io_queue_rsrc_removal(ctx->file_data, offset, ctx->rsrc_node, file);
+ ret = io_queue_rsrc_removal(ctx->file_data, offset, file);
if (ret)
return ret;