io_uring: local variable rw shadows outer variable in io_write

This fixes the shadowing of the outer variable rw in the function
io_write(). No issue is caused by this, but let's silence the shadowing
warning anyway.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Stefan Roesch <shr@devkernel.io>
Link: https://lore.kernel.org/r/20221010234330.244244-1-shr@devkernel.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Stefan Roesch 2022-10-10 16:43:30 -07:00 committed by Jens Axboe
parent 11528491c6
commit c86416c6ff

View File

@ -916,7 +916,7 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
goto copy_iov; goto copy_iov;
if (ret2 != req->cqe.res && ret2 >= 0 && need_complete_io(req)) { if (ret2 != req->cqe.res && ret2 >= 0 && need_complete_io(req)) {
struct io_async_rw *rw; struct io_async_rw *io;
trace_io_uring_short_write(req->ctx, kiocb->ki_pos - ret2, trace_io_uring_short_write(req->ctx, kiocb->ki_pos - ret2,
req->cqe.res, ret2); req->cqe.res, ret2);
@ -929,9 +929,9 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
iov_iter_save_state(&s->iter, &s->iter_state); iov_iter_save_state(&s->iter, &s->iter_state);
ret = io_setup_async_rw(req, iovec, s, true); ret = io_setup_async_rw(req, iovec, s, true);
rw = req->async_data; io = req->async_data;
if (rw) if (io)
rw->bytes_done += ret2; io->bytes_done += ret2;
if (kiocb->ki_flags & IOCB_WRITE) if (kiocb->ki_flags & IOCB_WRITE)
kiocb_end_write(req); kiocb_end_write(req);