Skip to content

Commit 49c21d9

Browse files
committed
io_uring/kbuf: use 'ctx' consistently
There's already a local ctx variable, yet the ring lock and unlock helpers use req->ctx. use ctx consistently. Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 98f3763 commit 49c21d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

io_uring/kbuf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct io_br_sel io_buffer_select(struct io_kiocb *req, size_t *len,
225225
struct io_br_sel sel = { };
226226
struct io_buffer_list *bl;
227227

228-
io_ring_submit_lock(req->ctx, issue_flags);
228+
io_ring_submit_lock(ctx, issue_flags);
229229

230230
bl = io_buffer_get_list(ctx, buf_group);
231231
if (likely(bl)) {
@@ -234,7 +234,7 @@ struct io_br_sel io_buffer_select(struct io_kiocb *req, size_t *len,
234234
else
235235
sel.addr = io_provided_buffer_select(req, len, bl);
236236
}
237-
io_ring_submit_unlock(req->ctx, issue_flags);
237+
io_ring_submit_unlock(ctx, issue_flags);
238238
return sel;
239239
}
240240

0 commit comments

Comments
 (0)