mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 09:09:47 +02:00
io_uring/rw: get rid of using req->imu
It's assigned in the same function that it's being used, get rid of it. A local variable will do just fine. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
892d3e80e1
commit
003f82b58c
1 changed files with 3 additions and 2 deletions
|
|
@ -330,6 +330,7 @@ static int io_prep_rw_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe
|
||||||
{
|
{
|
||||||
struct io_rw *rw = io_kiocb_to_cmd(req, struct io_rw);
|
struct io_rw *rw = io_kiocb_to_cmd(req, struct io_rw);
|
||||||
struct io_ring_ctx *ctx = req->ctx;
|
struct io_ring_ctx *ctx = req->ctx;
|
||||||
|
struct io_mapped_ubuf *imu;
|
||||||
struct io_async_rw *io;
|
struct io_async_rw *io;
|
||||||
u16 index;
|
u16 index;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
@ -341,11 +342,11 @@ static int io_prep_rw_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe
|
||||||
if (unlikely(req->buf_index >= ctx->nr_user_bufs))
|
if (unlikely(req->buf_index >= ctx->nr_user_bufs))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
index = array_index_nospec(req->buf_index, ctx->nr_user_bufs);
|
index = array_index_nospec(req->buf_index, ctx->nr_user_bufs);
|
||||||
req->imu = ctx->user_bufs[index];
|
imu = ctx->user_bufs[index];
|
||||||
io_req_set_rsrc_node(req, ctx, 0);
|
io_req_set_rsrc_node(req, ctx, 0);
|
||||||
|
|
||||||
io = req->async_data;
|
io = req->async_data;
|
||||||
ret = io_import_fixed(ddir, &io->iter, req->imu, rw->addr, rw->len);
|
ret = io_import_fixed(ddir, &io->iter, imu, rw->addr, rw->len);
|
||||||
iov_iter_save_state(&io->iter, &io->iter_state);
|
iov_iter_save_state(&io->iter, &io->iter_state);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue