Skip to content

Commit b0e9570

Browse files
isilenceaxboe
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/9e5defa000efd9b0f5e169cbb6bad4994d46ec5c.1743190078.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent fbe1a30 commit b0e9570

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

io_uring/msg_ring.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static void io_double_unlock_ctx(struct io_ring_ctx *octx)
3838
mutex_unlock(&octx->uring_lock);
3939
}
4040

41-
static int io_double_lock_ctx(struct io_ring_ctx *octx,
42-
unsigned int issue_flags)
41+
static int io_lock_external_ctx(struct io_ring_ctx *octx,
42+
unsigned int issue_flags)
4343
{
4444
/*
4545
* To ensure proper ordering between the two ctxs, we can only
@@ -154,7 +154,7 @@ static int __io_msg_ring_data(struct io_ring_ctx *target_ctx,
154154

155155
ret = -EOVERFLOW;
156156
if (target_ctx->flags & IORING_SETUP_IOPOLL) {
157-
if (unlikely(io_double_lock_ctx(target_ctx, issue_flags)))
157+
if (unlikely(io_lock_external_ctx(target_ctx, issue_flags)))
158158
return -EAGAIN;
159159
}
160160
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
199199
struct file *src_file = msg->src_file;
200200
int ret;
201201

202-
if (unlikely(io_double_lock_ctx(target_ctx, issue_flags)))
202+
if (unlikely(io_lock_external_ctx(target_ctx, issue_flags)))
203203
return -EAGAIN;
204204

205205
ret = __io_fixed_fd_install(target_ctx, src_file, msg->dst_fd);

0 commit comments

Comments
 (0)