From: Caleb Sander Mateos Date: Thu, 21 Aug 2025 16:33:07 +0000 (-0600) Subject: io_uring/cmd: deduplicate uring_cmd_flags checks X-Git-Tag: v6.18-rc1~137^2~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3484f530f8d9da08b71d1e604dcd4ab8868d9919;p=thirdparty%2Fkernel%2Flinux.git io_uring/cmd: deduplicate uring_cmd_flags checks 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 Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250821163308.977915-3-csander@purestorage.com Signed-off-by: Jens Axboe --- diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index 3cfb5d51b88a4..c8fd204f6892b 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -202,8 +202,6 @@ int io_uring_cmd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) } 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 {