ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd
authorMing Lei <ming.lei@redhat.com>
Fri, 6 Jan 2023 04:17:08 +0000 (12:17 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 29 Jan 2023 22:18:34 +0000 (15:18 -0700)
commitbfbcef036396a73fbf4b3fee385cc670159df5ad
tree31d9ed8fa65bfd9d49127ed07e665f67f4927624
parent73a166d9749230d598320fdae3b687cdc0e2e205
ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd

It is annoying for each control command handler to get/put ublk
device and deal with failure.

Control command handler is simplified a lot by moving
ublk_get_device_from_id into ublk_ctrl_uring_cmd().

Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230106041711.914434-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c