io_uring/cmd: consolidate REQ_F_BUFFER_SELECT checks
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 21 Aug 2025 16:33:08 +0000 (10:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 Aug 2025 17:41:12 +0000 (11:41 -0600)
commite5c717e7953b688049cdc2a2a474e4905e0da3c0
tree04843fea04dcb80358ca2a4328f4bb99cd4b966a
parent3484f530f8d9da08b71d1e604dcd4ab8868d9919
io_uring/cmd: consolidate REQ_F_BUFFER_SELECT checks

io_uring_cmd_prep() checks that REQ_F_BUFFER_SELECT is set in the
io_kiocb's flags iff IORING_URING_CMD_MULTISHOT is set in the SQE's
uring_cmd_flags. Consolidate the IORING_URING_CMD_MULTISHOT and
!IORING_URING_CMD_MULTISHOT branches into a single check that the
IORING_URING_CMD_MULTISHOT flag matches the REQ_F_BUFFER_SELECT flag.

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-4-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/uring_cmd.c