bdev/passthru: call spdk_bdev_module_release_bdev in the error path of registration
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453955 (master)
(cherry picked from commit cd02f1cda5
)
Change-Id: Ibdea7a34fff5cea7a9861a3172835429aef7e992
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457226
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
1c78126235
commit
38a1ebb516
@ -633,6 +633,7 @@ vbdev_passthru_register(struct spdk_bdev *bdev)
|
||||
rc = spdk_bdev_register(&pt_node->pt_bdev);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("could not register pt_bdev\n");
|
||||
spdk_bdev_module_release_bdev(&pt_node->pt_bdev);
|
||||
spdk_bdev_close(pt_node->base_desc);
|
||||
TAILQ_REMOVE(&g_pt_nodes, pt_node, link);
|
||||
spdk_io_device_unregister(pt_node, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user