Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Pavel Begunkov and committed by
Jens Axboe
b0e9570a fbe1a30c

+4 -4
+4 -4
io_uring/msg_ring.c
··· 38 38 mutex_unlock(&octx->uring_lock); 39 39 } 40 40 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) 43 43 { 44 44 /* 45 45 * To ensure proper ordering between the two ctxs, we can only ··· 154 154 155 155 ret = -EOVERFLOW; 156 156 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))) 158 158 return -EAGAIN; 159 159 } 160 160 if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags)) ··· 199 199 struct file *src_file = msg->src_file; 200 200 int ret; 201 201 202 - if (unlikely(io_double_lock_ctx(target_ctx, issue_flags))) 202 + if (unlikely(io_lock_external_ctx(target_ctx, issue_flags))) 203 203 return -EAGAIN; 204 204 205 205 ret = __io_fixed_fd_install(target_ctx, src_file, msg->dst_fd);