io_uring/msg_ring: cleanup posting to IOPOLL vs !IOPOLL ring
JIRA: https://issues.redhat.com/browse/RHEL-64867 commit 59b28a6e37e650c0d601ed87875b6217140cda5d Author: Jens Axboe <axboe@kernel.dk> Date: Thu Mar 28 10:42:40 2024 -0600 io_uring/msg_ring: cleanup posting to IOPOLL vs !IOPOLL ring Move the posting outside the checking and locking, it's cleaner that way. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
This commit is contained in:
parent
afb9313514
commit
ce17df8151
|
@ -147,13 +147,11 @@ static int io_msg_ring_data(struct io_kiocb *req, unsigned int issue_flags)
|
|||
if (target_ctx->flags & IORING_SETUP_IOPOLL) {
|
||||
if (unlikely(io_double_lock_ctx(target_ctx, issue_flags)))
|
||||
return -EAGAIN;
|
||||
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags))
|
||||
ret = 0;
|
||||
io_double_unlock_ctx(target_ctx);
|
||||
} else {
|
||||
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags))
|
||||
ret = 0;
|
||||
}
|
||||
if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags))
|
||||
ret = 0;
|
||||
if (target_ctx->flags & IORING_SETUP_IOPOLL)
|
||||
io_double_unlock_ctx(target_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue