blobstore: Fix error path for snapshot creation

In _spdk_bs_snapshot_origblob_sync_cpl function on error
path we should not close snapshot as it will be closed during
volume closing when bs_dev is being destroyed.
This issue was found in unit test (see next patch in series).

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I51c38d1f1f97b134679251b43109b1265e565a17
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455215
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Maciej Szwed 2019-05-21 11:12:42 +02:00 committed by Darek Stojaczyk
parent beefcd1ae5
commit f27cbce428

View File

@ -4499,7 +4499,7 @@ _spdk_bs_snapshot_origblob_sync_cpl(void *cb_arg, int bserrno)
if (bserrno != 0) {
_spdk_bs_snapshot_swap_cluster_maps(newblob, origblob);
_spdk_bs_clone_snapshot_newblob_cleanup(ctx, bserrno);
_spdk_bs_clone_snapshot_origblob_cleanup(ctx, bserrno);
return;
}