aboutsummaryrefslogtreecommitdiff
path: root/io_uring/io_uring.c
diff options
context:
space:
mode:
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r--io_uring/io_uring.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 60c947114fa3..78df515fb3a7 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1879,11 +1879,10 @@ inline struct file *io_file_get_fixed(struct io_kiocb *req, int fd,
struct file *file = NULL;
io_ring_submit_lock(ctx, issue_flags);
-
- if (unlikely((unsigned int)fd >= ctx->nr_user_files))
+ if (unlikely((unsigned int)fd >= ctx->file_table.data.nr))
goto out;
- fd = array_index_nospec(fd, ctx->nr_user_files);
- node = ctx->file_table.nodes[fd];
+ fd = array_index_nospec(fd, ctx->file_table.data.nr);
+ node = ctx->file_table.data.nodes[fd];
if (node) {
io_req_assign_rsrc_node(req, node);
req->flags |= io_slot_flags(node);