ublk: move check for empty address field on command submission
authorAndreas Hindborg <a.hindborg@samsung.com>
Fri, 4 Aug 2023 11:46:09 +0000 (13:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Aug 2023 21:45:53 +0000 (15:45 -0600)
commit1a6e88b9593b63ccdfe1d84e3f99dd91e4f8d490
tree57efe1cf2dfe7045f04a3e945a252490426961b3
parent9d4ed6d46272bb60036a6539aae74eafcbbb3d2d
ublk: move check for empty address field on command submission

In preparation for zoned storage support, move the check for empty `addr`
field into the command handler case statement. Note that the check makes no
sense for `UBLK_IO_NEED_GET_DATA` because the `addr` field must always be
set for this command.

Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230804114610.179530-3-nmi@metaspace.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c