summaryrefslogtreecommitdiff
path: root/io_uring/filetable.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-10-27 09:08:31 -0600
committerJens Axboe <axboe@kernel.dk>2024-11-02 15:45:30 -0600
commitb54a14041ee6444692d95ff38c8b3d1af682aa17 (patch)
tree658c5839cb2eb6dd19429c5e4911ea9cd727d664 /io_uring/filetable.h
parent3597f2786b687a7f26361ce00a805ea0af41b65f (diff)
io_uring/rsrc: add io_rsrc_node_lookup() helper
There are lots of spots open-coding this functionality, add a generic helper that does the node lookup in a speculation safe way. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/filetable.h')
-rw-r--r--io_uring/filetable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/filetable.h b/io_uring/filetable.h
index 664c31502dbb..29edda0caa65 100644
--- a/io_uring/filetable.h
+++ b/io_uring/filetable.h
@@ -52,7 +52,7 @@ static inline struct file *io_slot_file(struct io_rsrc_node *node)
static inline struct file *io_file_from_index(struct io_file_table *table,
int index)
{
- struct io_rsrc_node *node = table->data.nodes[index];
+ struct io_rsrc_node *node = io_rsrc_node_lookup(&table->data, index);
if (node)
return io_slot_file(node);