summaryrefslogtreecommitdiff
path: root/io_uring/rw.c
diff options
context:
space:
mode:
Diffstat (limited to 'io_uring/rw.c')
-rw-r--r--io_uring/rw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c
index 65491f4f2c7e..28fff18ebb19 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -339,10 +339,10 @@ static int io_prep_rw_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe
if (unlikely(ret))
return ret;
- if (unlikely(req->buf_index >= ctx->nr_user_bufs))
+ if (unlikely(req->buf_index >= ctx->buf_table.nr))
return -EFAULT;
- index = array_index_nospec(req->buf_index, ctx->nr_user_bufs);
- node = ctx->user_bufs[index];
+ index = array_index_nospec(req->buf_index, ctx->buf_table.nr);
+ node = ctx->buf_table.nodes[index];
io_req_assign_rsrc_node(req, node);
io = req->async_data;