ublk: cleanup ublk_ctrl_uring_cmd
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Jul 2022 13:09:13 +0000 (15:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Jul 2022 16:52:12 +0000 (10:52 -0600)
commit34d8f2bea52928626aefd6f7e0ba7e69f67c8e62
treeee187e28bdd1b139cf3f6b0ce694e5a9a0b28ba4
parentfa362045564ea7641e7d48295b54f4eb4df689ea
ublk: cleanup ublk_ctrl_uring_cmd

Move all per-command work into the per-command ublk_ctrl_* helpers
instead of being split over those, ublk_ctrl_cmd_validate, and the main
ublk_ctrl_uring_cmd handler.  To facilitate that, the old
ublk_ctrl_stop_dev function that just contained two function calls is
folded into both callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220721130916.1869719-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c