diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-08-08 10:33:16 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-08-25 08:27:01 -0600 |
commit | 03e02e8f95fee0f45124976993ed2121e2369a12 (patch) | |
tree | 0f72f806a7434acccef670618dc26b2cefaf07c1 /io_uring/kbuf.c | |
parent | 7255cd894539a96fefab9180185d268647c7341b (diff) |
io_uring/kbuf: use 'bl' directly rather than req->buf_list
req->buf_list is assigned higher up and is safe to use as we remain
within a locked region, as is the 'bl' variable itself from which it
was assigned. To improve readability, use 'bl' directly rather than
get it from the io_kiocb, if we need to increment the head directly
in the buffer selection path. This makes it readily apparent that
it's the same io_buffer_list being used.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/kbuf.c')
-rw-r--r-- | io_uring/kbuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index 1af2bd56af44..c61dd60113f7 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -298,7 +298,7 @@ int io_buffers_select(struct io_kiocb *req, struct buf_sel_arg *arg, */ if (ret > 0) { req->flags |= REQ_F_BL_NO_RECYCLE; - req->buf_list->head += ret; + bl->head += ret; } } else { ret = io_provided_buffers_select(req, &arg->out_len, bl, arg->iovs); |