From: Stefan Roesch <shr@devkernel.io>
To: kernel-team@fb.com, io-uring@vger.kernel.org
Cc: shr@devkernel.io, axboe@kernel.dk, kernel test robot <lkp@intel.com>
Subject: [PATCH v1] io_uring: local variable rw shadows outer variable in io_write
Date: Mon, 10 Oct 2022 16:43:30 -0700 [thread overview]
Message-ID: <20221010234330.244244-1-shr@devkernel.io> (raw)
This fixes the shadowing of the outer variable rw in the function
io_write().
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Stefan Roesch <shr@devkernel.io>
---
io_uring/rw.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/io_uring/rw.c b/io_uring/rw.c
index a25cd44cd415..453e0ae92160 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -916,7 +916,7 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
goto copy_iov;
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,
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);
ret = io_setup_async_rw(req, iovec, s, true);
- rw = req->async_data;
- if (rw)
- rw->bytes_done += ret2;
+ io = req->async_data;
+ if (io)
+ io->bytes_done += ret2;
if (kiocb->ki_flags & IOCB_WRITE)
kiocb_end_write(req);
base-commit: e2302539dd4f1c62d96651c07ddb05aa2461d29c
--
2.30.2
next reply other threads:[~2022-10-11 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 23:43 Stefan Roesch [this message]
2022-10-11 2:54 ` [PATCH v1] io_uring: local variable rw shadows outer variable in io_write Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221010234330.244244-1-shr@devkernel.io \
--to=shr@devkernel.io \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=kernel-team@fb.com \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.