Commit 4add705e authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Jens Axboe

io_uring: remove io_register_submitter

this is no longer needed, as submitter_task is set at creation time.
Signed-off-by: default avatarDylan Yudaken <dylany@fb.com>
Fixes: 97bbdc06 ("io_uring: add IORING_SETUP_SINGLE_ISSUER")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 97c96e9f
...@@ -91,20 +91,6 @@ __cold int io_uring_alloc_task_context(struct task_struct *task, ...@@ -91,20 +91,6 @@ __cold int io_uring_alloc_task_context(struct task_struct *task,
return 0; return 0;
} }
static int io_register_submitter(struct io_ring_ctx *ctx)
{
int ret = 0;
mutex_lock(&ctx->uring_lock);
if (!ctx->submitter_task)
ctx->submitter_task = get_task_struct(current);
else if (ctx->submitter_task != current)
ret = -EEXIST;
mutex_unlock(&ctx->uring_lock);
return ret;
}
int __io_uring_add_tctx_node(struct io_ring_ctx *ctx) int __io_uring_add_tctx_node(struct io_ring_ctx *ctx)
{ {
struct io_uring_task *tctx = current->io_uring; struct io_uring_task *tctx = current->io_uring;
...@@ -151,11 +137,9 @@ int __io_uring_add_tctx_node_from_submit(struct io_ring_ctx *ctx) ...@@ -151,11 +137,9 @@ int __io_uring_add_tctx_node_from_submit(struct io_ring_ctx *ctx)
{ {
int ret; int ret;
if (ctx->flags & IORING_SETUP_SINGLE_ISSUER) { if (ctx->flags & IORING_SETUP_SINGLE_ISSUER
ret = io_register_submitter(ctx); && ctx->submitter_task != current)
if (ret) return -EEXIST;
return ret;
}
ret = __io_uring_add_tctx_node(ctx); ret = __io_uring_add_tctx_node(ctx);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment