diff options
author | Dylan Yudaken <dylany@fb.com> | 2022-09-26 19:09:26 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-07 20:25:30 +0200 |
commit | 97c96e9fa36616d7890a6f3438172fc501927f01 (patch) | |
tree | 439ef1b2f6d88510bdea04de805b0f7c38c0e00a /io_uring/tctx.h | |
parent | Merge tag 'drm-next-2022-10-07-1' of git://anongit.freedesktop.org/drm/drm (diff) | |
download | linux-97c96e9fa36616d7890a6f3438172fc501927f01.tar.xz linux-97c96e9fa36616d7890a6f3438172fc501927f01.zip |
io_uring: simplify __io_uring_add_tctx_node
Remove submitter parameter from __io_uring_add_tctx_node.
It was only called from one place, and we can do that logic in that one
place.
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Fixes: 97bbdc06a444 ("io_uring: add IORING_SETUP_SINGLE_ISSUER")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/tctx.h')
-rw-r--r-- | io_uring/tctx.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/io_uring/tctx.h b/io_uring/tctx.h index 25974beed4d6..608e96de70a2 100644 --- a/io_uring/tctx.h +++ b/io_uring/tctx.h @@ -9,7 +9,8 @@ struct io_tctx_node { int io_uring_alloc_task_context(struct task_struct *task, struct io_ring_ctx *ctx); void io_uring_del_tctx_node(unsigned long index); -int __io_uring_add_tctx_node(struct io_ring_ctx *ctx, bool submitter); +int __io_uring_add_tctx_node(struct io_ring_ctx *ctx); +int __io_uring_add_tctx_node_from_submit(struct io_ring_ctx *ctx); void io_uring_clean_tctx(struct io_uring_task *tctx); void io_uring_unreg_ringfd(void); @@ -27,5 +28,6 @@ static inline int io_uring_add_tctx_node(struct io_ring_ctx *ctx) if (likely(tctx && tctx->last == ctx)) return 0; - return __io_uring_add_tctx_node(ctx, true); + + return __io_uring_add_tctx_node_from_submit(ctx); } |