diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-03-25 11:52:16 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-24 17:34:19 -0600 |
commit | 963c6abbb4e4ee3d00ca7992f751c49b38b07e68 (patch) | |
tree | 71c7e26719ad41ba963e8bcbbb6bcf7db6a57aa1 /fs/io_uring.c | |
parent | 9d170164dbac3f674b5ec2189e2a279eb0b7625f (diff) | |
download | lwn-963c6abbb4e4ee3d00ca7992f751c49b38b07e68.tar.gz lwn-963c6abbb4e4ee3d00ca7992f751c49b38b07e68.zip |
io_uring: silence io_for_each_link() warning
Some tooling keep complaining about self assignment in
io_for_each_link(), the code is correct but still let's workaround it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f0de77b0b0f8309554ba6fba34327b7813bcc3ff.1648209006.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 4c4b81d691a9..ef95829c9ae1 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -6959,9 +6959,10 @@ static int io_req_prep_async(struct io_kiocb *req) static u32 io_get_sequence(struct io_kiocb *req) { u32 seq = req->ctx->cached_sq_head; + struct io_kiocb *cur; /* need original cached_sq_head, but it was increased for each req */ - io_for_each_link(req, req) + io_for_each_link(cur, req) seq--; return seq; } |