summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorHao Xu <haoxu@linux.alibaba.com>2021-12-14 13:59:04 +0800
committerJens Axboe <axboe@kernel.dk>2021-12-14 06:49:06 -0700
commit33ce2aff7d340bf48875ccd80628c884cf8017ae (patch)
treecd7f43849c2fd661c094f75b7c7fa75f9013258f /fs/io_uring.c
parentf28c240e7152462f0750a8939db28d985ecf7c67 (diff)
downloadlinux-stable-33ce2aff7d340bf48875ccd80628c884cf8017ae.tar.gz
linux-stable-33ce2aff7d340bf48875ccd80628c884cf8017ae.tar.bz2
linux-stable-33ce2aff7d340bf48875ccd80628c884cf8017ae.zip
io_uring: code clean for some ctx usage
There are some functions doing ctx = req->ctx while still using req->ctx, update those places. Signed-off-by: Hao Xu <haoxu@linux.alibaba.com> Link: https://lore.kernel.org/r/20211214055904.61772-1-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 92dc33519466..1f2341d87588 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1549,7 +1549,7 @@ static void io_prep_async_link(struct io_kiocb *req)
static inline void io_req_add_compl_list(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
- struct io_submit_state *state = &req->ctx->submit_state;
+ struct io_submit_state *state = &ctx->submit_state;
if (!(req->flags & REQ_F_CQE_SKIP))
ctx->submit_state.flush_cqes = true;
@@ -2188,7 +2188,7 @@ static void __io_req_find_next_prep(struct io_kiocb *req)
spin_lock(&ctx->completion_lock);
posted = io_disarm_next(req);
if (posted)
- io_commit_cqring(req->ctx);
+ io_commit_cqring(ctx);
spin_unlock(&ctx->completion_lock);
if (posted)
io_cqring_ev_posted(ctx);