From: Ming Lei <ming.lei@redhat.com>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH 2/3] io_uring/cmd: deduplicate uring_cmd_flags checks
Date: Fri, 22 Aug 2025 09:16:53 +0800 [thread overview]
Message-ID: <aKfFBe_nNskOLwvx@fedora> (raw)
In-Reply-To: <20250821163308.977915-3-csander@purestorage.com>
On Thu, Aug 21, 2025 at 10:33:07AM -0600, Caleb Sander Mateos wrote:
> io_uring_cmd_prep() currently has two checks for whether
> IORING_URING_CMD_FIXED and IORING_URING_CMD_MULTISHOT are both set in
> uring_cmd_flags. Remove the second check.
>
> Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
> ---
> io_uring/uring_cmd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
> index 3cfb5d51b88a..c8fd204f6892 100644
> --- a/io_uring/uring_cmd.c
> +++ b/io_uring/uring_cmd.c
> @@ -200,12 +200,10 @@ int io_uring_cmd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
> return -EINVAL;
> req->buf_index = READ_ONCE(sqe->buf_index);
> }
>
> if (ioucmd->flags & IORING_URING_CMD_MULTISHOT) {
> - if (ioucmd->flags & IORING_URING_CMD_FIXED)
> - return -EINVAL;
> if (!(req->flags & REQ_F_BUFFER_SELECT))
> return -EINVAL;
> } else {
> if (req->flags & REQ_F_BUFFER_SELECT)
> return -EINVAL;
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Thanks,
Ming
next prev parent reply other threads:[~2025-08-22 1:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 16:33 [PATCH 0/3] IORING_URING_CMD_MULTISHOT fixups Caleb Sander Mateos
2025-08-21 16:33 ` [PATCH 1/3] io_uring/cmd: fix io_uring_mshot_cmd_post_cqe() for !CONFIG_IO_URING Caleb Sander Mateos
2025-08-21 16:38 ` Jens Axboe
2025-08-21 16:33 ` [PATCH 2/3] io_uring/cmd: deduplicate uring_cmd_flags checks Caleb Sander Mateos
2025-08-22 1:16 ` Ming Lei [this message]
2025-08-21 16:33 ` [PATCH 3/3] io_uring/cmd: consolidate REQ_F_BUFFER_SELECT checks Caleb Sander Mateos
2025-08-22 1:18 ` Ming Lei
2025-08-22 1:59 ` (subset) [PATCH 0/3] IORING_URING_CMD_MULTISHOT fixups Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKfFBe_nNskOLwvx@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.