ublk: handle UBLK_IO_FETCH_REQ earlier
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 20 Jun 2025 15:09:58 +0000 (09:09 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 30 Jun 2025 22:02:46 +0000 (16:02 -0600)
commitee97736384beccc1f72116718af23e5f6de75210
treeef2a76651d6a0bb49b8d53adec9148084e591724
parent5af8b36f6e4c8b39f6fffc45b066039349a5163a
ublk: handle UBLK_IO_FETCH_REQ earlier

Check for UBLK_IO_FETCH_REQ early in __ublk_ch_uring_cmd() and skip the
rest of the checks in this case. This allows removing the checks for
NULL io->task and UBLK_IO_FLAG_OWNED_BY_SRV unset in io->flags, which
are only allowed for FETCH.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250620151008.3976463-5-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c