io_uring/msg: rename io_double_lock_ctx()
io_double_lock_ctx() doesn't lock both rings. Rename it to prevent any future confusion. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9e5defa000efd9b0f5e169cbb6bad4994d46ec5c.1743190078.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>pull/1194/head
parent
fbe1a30c5d
commit
b0e9570a6b
|
|
@ -38,7 +38,7 @@ static void io_double_unlock_ctx(struct io_ring_ctx *octx)
|
||||||
mutex_unlock(&octx->uring_lock);
|
mutex_unlock(&octx->uring_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int io_double_lock_ctx(struct io_ring_ctx *octx,
|
static int io_lock_external_ctx(struct io_ring_ctx *octx,
|
||||||
unsigned int issue_flags)
|
unsigned int issue_flags)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
@ -154,7 +154,7 @@ static int __io_msg_ring_data(struct io_ring_ctx *target_ctx,
|
||||||
|
|
||||||
ret = -EOVERFLOW;
|
ret = -EOVERFLOW;
|
||||||
if (target_ctx->flags & IORING_SETUP_IOPOLL) {
|
if (target_ctx->flags & IORING_SETUP_IOPOLL) {
|
||||||
if (unlikely(io_double_lock_ctx(target_ctx, issue_flags)))
|
if (unlikely(io_lock_external_ctx(target_ctx, issue_flags)))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags))
|
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags))
|
||||||
|
|
@ -199,7 +199,7 @@ static int io_msg_install_complete(struct io_kiocb *req, unsigned int issue_flag
|
||||||
struct file *src_file = msg->src_file;
|
struct file *src_file = msg->src_file;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (unlikely(io_double_lock_ctx(target_ctx, issue_flags)))
|
if (unlikely(io_lock_external_ctx(target_ctx, issue_flags)))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
||||||
ret = __io_fixed_fd_install(target_ctx, src_file, msg->dst_fd);
|
ret = __io_fixed_fd_install(target_ctx, src_file, msg->dst_fd);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue