Ming Lei 93d71ec89d ublk_drv: fix ublk device leak in case that add_disk fails
->free_disk is only called after disk is added successfully, so
drop ublk device reference in case of add_disk() failure.

Fixes: 6d9e6dfdf3b2 ("ublk: defer disk allocation")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220730092750.1118167-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-08-02 21:13:40 -06:00
..
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-07-14 12:14:31 -06:00
2022-07-14 12:14:31 -06:00
2022-08-02 17:22:46 -06:00
2022-06-28 06:33:15 -06:00
2022-08-02 17:22:46 -06:00
2022-06-28 06:33:15 -06:00
2022-08-02 17:22:41 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2022-08-02 13:46:35 -07:00
2022-06-28 06:33:15 -06:00