Skip to content

Commit c86416c

Browse files
Stefan Roeschaxboe
authored andcommitted
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 <[email protected]> Signed-off-by: Stefan Roesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 1152849 commit c86416c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

io_uring/rw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
916916
goto copy_iov;
917917

918918
if (ret2 != req->cqe.res && ret2 >= 0 && need_complete_io(req)) {
919-
struct io_async_rw *rw;
919+
struct io_async_rw *io;
920920

921921
trace_io_uring_short_write(req->ctx, kiocb->ki_pos - ret2,
922922
req->cqe.res, ret2);
@@ -929,9 +929,9 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
929929
iov_iter_save_state(&s->iter, &s->iter_state);
930930
ret = io_setup_async_rw(req, iovec, s, true);
931931

932-
rw = req->async_data;
933-
if (rw)
934-
rw->bytes_done += ret2;
932+
io = req->async_data;
933+
if (io)
934+
io->bytes_done += ret2;
935935

936936
if (kiocb->ki_flags & IOCB_WRITE)
937937
kiocb_end_write(req);

0 commit comments

Comments
 (0)