]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring/cmd: deduplicate uring_cmd_flags checks
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 21 Aug 2025 16:33:07 +0000 (10:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 Aug 2025 17:41:12 +0000 (11:41 -0600)
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>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250821163308.977915-3-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/uring_cmd.c

index 3cfb5d51b88a470b8b477870af6887994a0e1517..c8fd204f6892b0b4b40caa171dc6da15e9deefb9 100644 (file)
@@ -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 {